Results 1 to 10 of 10

Thread: Pass Parameter using Launch Batch Application.

  1. #1

    Pass Parameter using Launch Batch Application.


    I had a sales report which was scheduled and mailed to a single email ID, now I have a requirement to run the report for each customer separately and mail it to different internal mail ID’s set up in customer master.
    Now since I am using Launch Batch Application Business Function I am not able to pass customer no. through data structure. I am looking for a work around for this!!!!!

    Suraj R
    E1 8.12 (TR 8.98.47)
    Servers: iSeries
    Websphere 7.0
    WebDev Client: Windows 7 (64 bit)

  2. #2
    Senior Member sviardot's Avatar
    Join Date
    Mar 2001
    Location
    france
    Posts
    396

    Re: Pass Parameter using Launch Batch Application.

    Is a standard or a specific (UBE and CallBatch BSFN) ?
    Serge Viardot
    Consultant Technique JDE
    Cap Gemini
    France

  3. #3
    Member
    Join Date
    Nov 2000
    Location
    Denver, Colorado
    Posts
    622

    Re: Pass Parameter using Launch Batch Application.

    Well, not a great solution, but, maybe the only one you have....... create a version for each customer? An maybe the customer number could be part of the version.....

    Ben again,

  4. #4
    Senior Member WhippingBoy's Avatar
    Join Date
    Jun 2001
    Location
    Colorado, USA
    Posts
    708

    Re: Pass Parameter using Launch Batch Application.

    Time to write your own C function to start the batch program.

    Look at B31B9030: it's small and demonstrates how to pass RI values.

    Copy that thing and you're in business.


    Please forward your mailing address and I'll send my invoice.

    P.S. Be prepared. . .because my rate is reasonably outrageous (and by 'reasonably' I mean 'simply').
    Darren Ricciardi - E-One Whipping Boy
    Senior Director, Technologies
    Advanced Logistics Consulting
    Instructor, Oracle University


  5. #5

    Re: Pass Parameter using Launch Batch Application.

    I was just thinking if I update a temporary table from my primary report based on the customer master and call my secondary report which is to be mailed and in its initialize I fetch and filter and flush it.
    May be this is not the best practice even I would like to customize the Launch Batch Application (B91300C) to take RI since the API used i.e jdeLaunchUBEEx allows you to do that, but unfortunately C is not my area of expertise…
    Suraj R
    E1 8.12 (TR 8.98.47)
    Servers: iSeries
    Websphere 7.0
    WebDev Client: Windows 7 (64 bit)

  6. #6

    Re: Pass Parameter using Launch Batch Application.

    Dear WhippingBoy,
    I can’t Find B31B9030 in XE!!!!!!!!
    Suraj R
    E1 8.12 (TR 8.98.47)
    Servers: iSeries
    Websphere 7.0
    WebDev Client: Windows 7 (64 bit)

  7. #7
    Senior Member sviardot's Avatar
    Join Date
    Mar 2001
    Location
    france
    Posts
    396

    Re: Pass Parameter using Launch Batch Application.

    try B3700490 or b4900460 to see how to use RI's parameters

    hoe this help
    Serge Viardot
    Consultant Technique JDE
    Cap Gemini
    France

  8. #8
    Senior Member
    Join Date
    Mar 2004
    Location
    Fort Worth, Texas
    Posts
    1,534

    Re: Pass Parameter using Launch Batch Application.

    in case you cant find any examples, here is a snippet of code where I pretty much did what whipping boy is talking about.


    lpDS->cErrorStatus = '0';

    if( JDB_InitBhvr(lpBhvrCom, &hUser, (char *) NULL, JDEDB_COMMIT_AUTO) != JDEDB_PASSED ) {
    jdeErrorSet(lpBhvrCom, lpVoid, (ID) 0, "139F", (LPVOID) NULL);
    idReturn = ER_ERROR;
    goto FunctionCleanUp;
    }

    jdeNIDcpy(dsUbeStructure.szReport, "R5641EX1A");
    jdeNIDcpy(dsUbeStructure.szVersion, "ACME0001");

    if( (jdeGetHostName(dsUbeStructure.szMachineKey,16,1) != 0) ||
    (!GetLocalEnvironmentName(dsUbeStructure.szEnhv,11 )) ) {
    idReturn = ER_ERROR;
    jdeSetGBRError(lpBhvrCom, lpVoid, (ID)0, "0002");
    goto FunctionCleanUp;
    }

    /* changes 16 bit value to 32 bit value*/
    dsUbeStructure.idRunTime = (GLRTID)lpBhvrCom->hDlg << 16; /* no longer needed ????? */
    dsUbeStructure.bSynchFlag = TRUE;
    dsUbeStructure.bPreview = FALSE;
    dsUbeStructure.bBatchFlag = TRUE;

    /* set ube inter-connect */
    strcpy( dsUbeInterCon.szCompany, lpDS->szCompany );
    strcpy( dsUbeInterCon.szShippingBP, lpDS->szShippingBP );
    strcpy( dsUbeInterCon.szRegion, lpDS->szRegion );
    strcpy( dsUbeInterCon.szGlGroup, lpDS->szGlGroup );
    strcpy( dsUbeInterCon.szGroup, lpDS->szGroup );
    strcpy( dsUbeInterCon.szSubGroup, lpDS->szSubGroup );
    MathCopy( &dsUbeInterCon.mnPlantOfMfg, &lpDS->mnPlantOfMfg );
    dsUbeInterCon.cOrderPolicyCode = lpDS->cOrderPolicyCode;
    MathCopy( &dsUbeInterCon.mnSortSelectionSequence, &lpDS->mnSortSelectionSequence );
    strcpy( dsUbeInterCon.szEdiBatchNumber, lpDS->szEdiBatchNumber );

    /* launch ube */
    idJDEDBReturn = jdeLaunchUBEEx(hUser, &dsUbeStructure, (void *)&dsUbeInterCon, lpBhvrCom);
    if(idJDEDBReturn != JDEDB_PASSED) {
    idReturn = ER_ERROR;
    jdeSetGBRError(lpBhvrCom, lpVoid, (ID)0, "0002");
    goto FunctionCleanUp;
    }
    Brian Oster
    Application Development Manager
    E1: 9.0 (TR9.1.5.1) / 9.2 (TR9.2.2.2)
    JAS/BSSV: Weblogic 12.1.2 / Weblogic 12.2
    ES: Win2008 / Win2016
    DB: MSSQL 2014 / 2016
    WebDev Client: Win7Pro / Win10Pro

  9. #9
    Senior Member peterbruce's Avatar
    Join Date
    Jan 2004
    Location
    NSW Australia
    Posts
    2,139

    Re: Pass Parameter using Launch Batch Application.

    jdecoder,

    Serge's original question about whether the called UBE is standard or custom is important because modification of the called UBE would be simpler for someone who is not very "C" literate (like myself) and it is not advisable to modify standard UBEs. From your comments it would appear that it is a custom UBE and there is no problem with modifying it.

    Your idea of using a temporary table to pass the customer number(s) to the called UBE is an example of probably the only method, other than writing you own "C" business function, available. Rather than creating a new temporary table (unless you already have one that you can use) you could use a custom UDC to accomplish the same task.

    All the best with a solution.
    Thanks, Peter

    "Give a person a fish, feed them for a day, teach them how to fish, feed them for a lifetime."

    E9.1 TR9.1.2.1, Enterprise Server: Sun, Database Server: Sun, Oracle DB: 11g, Weblogic.
    Create!form 7

  10. #10

    Re: Pass Parameter using Launch Batch Application.

    Hey guys,
    Thanks for all the help especially WhippingBoy & BOster I have decided to do it via C it took some time but I succeeded (I had to start with writing C BF some day in my career). The C solution seems to the best practice compared to temp table idea.

    Thanks again.
    Suraj R
    E1 8.12 (TR 8.98.47)
    Servers: iSeries
    Websphere 7.0
    WebDev Client: Windows 7 (64 bit)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
The legal restrictions and terms of use applicable to this site are available here.
Use of this site signifies your agreement to the terms of use.
JDELIST is NOT affiliated with JD Edwards® & Company, Oracle or Peoplesoft. Contents of this site are neither endorsed nor approved by JD Edwards® & Company and, or Oracle.