Calling an executable program.

Hi,
I have create a program that needs to call a second program sending it an internal table.
Is this possible? I know that I can use SUBMIT but I can't find the way to send it an IT to that second program.
Any Idea?

Hello
I had worked on a program very similar long time back
DATA: abaplist LIKE abaplist OCCURS 0 WITH HEADER LINE.
*Report variant layout structure
*Work Area
DATA: BEGIN OF wa_iw47,
  dummy TYPE c,
  rmzhl(8) TYPE c, " LIKE rihafvr-rmzhl,
  ernam  LIKE rihafvr-ernam,
  aufnr  LIKE rihafvr-aufnr,
  vornr  LIKE rihafvr-vornr,
  aueru LIKE  rihafvr-aueru,
  ltxa1  LIKE rihafvr-ltxa1,
  grund  LIKE rihafvr-grund,
SUKA           SIR 10-54742 03/10/2005 Add a Creation Date field
  ersda LIKE rihafvr-ersda,
  END OF wa_iw47.
*Internal table
DATA i_iw47 LIKE TABLE OF wa_iw47.
*Temporary work area to store the information into ascii format
DATA: BEGIN OF wa,
      name(3000) TYPE c,
      END OF wa,
      itab LIKE TABLE OF wa.
*Work area to have the header information
DATA: BEGIN OF wa_header,
      f1(20) TYPE c VALUE 'Counter',
      f2(20) TYPE c VALUE 'Created',
      f3(20) TYPE c VALUE 'Order',
      f4(20) TYPE c VALUE 'Operation',
      f5(10) TYPE c VALUE 'FC',
      f6(20) TYPE c VALUE 'Confirmation Text',
      f7(20) TYPE c VALUE 'Rsn',
SUKA           SIR 10-54742 03/10/2005 Add a Creation Date field
      f8(20) TYPE c VALUE 'Creation Date',
      END OF wa_header.
*Other Variables
DATA: zzlv_filename(100)       TYPE c,
      zzlv_tabix               TYPE sytabix,
      zzlv_slen                TYPE i,
      zzlv_datarec(3000)       TYPE c,
      w_event LIKE tbtco-eventid,
      w_grid TYPE c.
*BEGIN: SIR 10-55315
Commented out unused code
*DATA: BEGIN OF i_rihafvr OCCURS 0.
       INCLUDE STRUCTURE rihafvr.
*DATA   END OF i_rihafvr.
*END:   SIR 10-55315
*Constants
CONSTANTS: c_event(25) TYPE c VALUE 'ZIW47_TRANSFER_FILE',
           c_grid TYPE c VALUE '1',
             c_quotes TYPE c VALUE '"',
           c_comma TYPE c VALUE ','.
*SIR:
PARAMETERS: p_fn(100) TYPE c LOWER CASE,
            p_var(50) TYPE c,
            p_event(25) TYPE c.
*START OF SELECTION
START-OF-SELECTION.
  GET PARAMETER ID 'Q_ALV_GRID_INACTIVE' FIELD w_grid.
  IF w_grid <> '1'.
    SET PARAMETER ID 'Q_ALV_GRID_INACTIVE' FIELD c_grid.
  ENDIF.
*File Name Construction
*CONCATENATE '/usr/sap/interface/' sy-sysid '/PlantMaintenance/IW47.CSV'
   INTO  zzlv_filename.
  zzlv_filename = p_fn.
*Call Report and pass variant.
SUBMIT riafru20 AND RETURN
       EXPORTING LIST TO MEMORY
       USING SELECTION-SET p_var.
  SUBMIT riafru20 AND RETURN
        EXPORTING LIST TO MEMORY
        USING SELECTION-SET p_var.
*Call function to read memory
  CALL FUNCTION 'LIST_FROM_MEMORY'
       TABLES
            listobject = abaplist
       EXCEPTIONS
            not_found  = 1.
  IF sy-subrc NE 0.
    " leave program.
    IF sy-batch = ''.                            "SIR 10-55315
      WRITE: / 'RC = ', sy-subrc.
*BEGIN: SIR 10-55315
      WRITE: / 'No data meets variant criteria'.
      EXIT.
    ELSE.
      MESSAGE i398(00) WITH 'No data meets variant criteria'.
      LEAVE PROGRAM.
    ENDIF.
*END:   SIR 10-55315
  ENDIF.
*Convert the Memory into Ascii format
  CALL FUNCTION 'LIST_TO_ASCI'
   EXPORTING
     list_index               = -1
     with_line_break          = ' '
    TABLES
      listasci                 = itab
     listobject               = abaplist
EXCEPTIONS
  EMPTY_LIST               = 1
  LIST_INDEX_INVALID       = 2
  OTHERS                   = 3
  IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
Check data for output exists:
  DESCRIBE TABLE itab LINES zzlv_tabix.
  IF zzlv_tabix EQ 0.
    MESSAGE i398(00) WITH 'No data to export'.
    EXIT.
  ENDIF.
*End Of Selection
END-OF-SELECTION.
  PERFORM open_dataset.
*IF p_var = 'IW47_BACK' OR p_var = 'IW47_TBACK' .
  IF p_var <> 'IW47_All'.
    PERFORM iw47_back_header.
*Read data from internal table, concatenate all fields separated by a
*comma and then transfer data
    LOOP AT i_iw47 INTO wa_iw47.
*Concatenate all fields seperated by a comma to create a CSV file
      CONCATENATE :   wa_iw47-rmzhl  c_comma
                      wa_iw47-ernam  c_comma
                      wa_iw47-aufnr  c_comma
                      wa_iw47-vornr  c_comma
                      wa_iw47-aueru  c_comma
                     c_quotes wa_iw47-ltxa1  c_quotes c_comma
                     c_quotes wa_iw47-grund  c_quotes c_comma
SUKA           SIR 10-54742 03/10/2005 Add a Creation Date field
                       wa_iw47-ersda
       INTO : zzlv_datarec.
      "SEPARATED BY: ','.
      PERFORM transfer_dataset.
    ENDLOOP.
  ELSE.
*Read data from internal table, concatenate all fields separated by a
*comma and then transfer data
    LOOP AT itab INTO wa.
      IF sy-tabix > 3 AND sy-tabix < zzlv_tabix .
        zzlv_datarec = wa.
        PERFORM transfer_dataset.
      ENDIF.
    ENDLOOP.
  ENDIF.
*Close the file
  CLOSE DATASET zzlv_filename.
  PERFORM raise_event.
*Setting the ALV Grid
  IF w_grid <> '1'.
    SET PARAMETER ID 'Q_ALV_GRID_INACTIVE' FIELD w_grid.
  ENDIF.
*&      Form  IW47_BACK
      text
-->  p1        text
<--  p2        text
FORM iw47_back_header.
*Concatenate header first
*Read the memory into internal table IW47 Report Structure
  LOOP AT itab INTO wa.
    IF sy-tabix > 3 AND sy-tabix < zzlv_tabix .
      SPLIT wa-name AT '|' INTO wa_iw47-dummy
       wa_iw47-rmzhl
        wa_iw47-ernam
        wa_iw47-aufnr
        wa_iw47-vornr
        wa_iw47-aueru
        wa_iw47-ltxa1
        wa_iw47-grund
SUKA           SIR 10-54742 03/10/2005 Add a Creation Date field
         wa_iw47-ersda.
      APPEND wa_iw47 TO i_iw47.
    ENDIF.
    CLEAR wa.
    CLEAR wa_iw47.
  ENDLOOP.
*Header
  CONCATENATE wa_header-f1
              wa_header-f2
              wa_header-f3
              wa_header-f4
              wa_header-f5
              wa_header-f6
              wa_header-f7
SUKA           SIR 10-54742 03/10/2005 Add a Creation Date field
             wa_header-f8 INTO zzlv_datarec SEPARATED BY ','.
  PERFORM transfer_dataset.
ENDFORM.                                                    " IW47_BACK
*&      Form  Open_dataset
      text
-->  p1        text
<--  p2        text
FORM open_dataset.
*Download file onto application server
*open file
  CATCH SYSTEM-EXCEPTIONS file_access_errors = 1.
    OPEN DATASET zzlv_filename FOR OUTPUT IN TEXT MODE.
  ENDCATCH.
  IF sy-subrc NE 0.
    MESSAGE e041(a4) WITH zzlv_filename sy-host.
  ENDIF.
ENDFORM.                    " Open_dataset
*&      Form  transfer_IW47_Back
      text
-->  p1        text
<--  p2        text
FORM transfer_dataset.
  zzlv_slen = strlen( zzlv_datarec ).
*Transfer header information
  IF sy-batch = ''.
    WRITE:/ zzlv_datarec .
  ENDIF.
  CATCH SYSTEM-EXCEPTIONS file_access_errors = 1.
    TRANSFER zzlv_datarec  TO zzlv_filename LENGTH zzlv_slen.
    IF sy-batch = ''.
      WRITE:/ zzlv_datarec .
    ENDIF.
  ENDCATCH.
  CLEAR  zzlv_datarec.
  CLEAR  zzlv_slen.
ENDFORM.                    " transfer_IW47_Back
*&      Form  Raise_event
      text
-->  p1        text
<--  p2        text
FORM raise_event.
Raise Event - to execute job that will execute a shell scrip that
*will transfer the downloaded file from the SAP application server to a
*local network server.
  w_event = c_event.
  CALL FUNCTION 'BP_EVENT_RAISE'
      EXPORTING
        eventid                      = p_event
     EVENTPARM                    = w_param
  TARGET_INSTANCE              = ' '
     EXCEPTIONS
       bad_eventid                  = 1
       eventid_does_not_exist       = 2
       eventid_missing              = 3
       raise_failed                 = 4
       OTHERS                       = 5.
*BEGIN: SIR 10-55315
Add exception check
  IF sy-subrc NE 0.
    IF sy-batch = ''.
      WRITE: / 'File not transferred.',
               'FM BP_EVENT_RAISE exception raised:',
               'RC = ', sy-subrc.
    ELSE.
      MESSAGE e398(00) WITH 'File not transferred'
                            'FM BP_EVENT_RAISE exception raised: '
                            'RC = ' sy-subrc.
    ENDIF.
  ENDIF.
*END:   SIR 10-55315
ENDFORM.                    " Raise_event

Similar Messages

  • Call an executable program inside function module and pass the table values

    Hi,
           i'm pretty new to HR Abap programming. I have a requirement like "calling an executable program within a function module and the output of the program data(Stored in internal tables) should be passed to the function module tables".
    I've some idea about SUBMIT keyword and i used it in the function module..
    Please do the needful to solve this.
    Regards,
    Selvi.

    Hi,
    Thanks for all your reply.
      I've used Option 3 as per dsouzajovito suggestion. Now i'm getting data in function module tables using import/ export table to memory concept.
    Again a small issue arises, while i'm executing function module it fetches all pernr available in the server and displays the details of last pernr. GET pernr statement is used in the Z report and submit statement is used like this as follows.
      SUBMIT ZHR_RFC_PAYSLIP   WITH  PERNR-PERNR EQ EMPCODE
                                          WITH PYBEGDA EQ FDATE
                                          WITH PYENDDA EQ LDATE
                                          AND RETURN.
    Pls suggest if there is any corrections in the code.
    If i give a pernr as input in the function module, then it should fetch the details related only to that pernr.
    FYI, No selection screen is used here as per requirement.
    Regards,
    Selvi.

  • Calling an Executable program in a Web dynpro

    Hi
    We would like to change the initial screen of one of our functionalities (kilometre claims), but the info after you submit the selection info does not need to change.  We have an executable program with the detail of the screen.
    I created a new Web dynpro application with the select options that must be entered; if you then click on a Submit button, I would like to call the current executable program, but I am not sure how I must do this.
    Example:
    To call a method, I always use: Call method ZCL_WD_PA=>ZHRPA_UPDATE_IT9004, but I am not sure how to call an executable program and with info is needed.
    Could anyone please assist?
    Regards
    Debbie

    Hi
    We have a functionality via Employee Self-Service (Portal ECC6) where an employee can view their Kilometre claimsin a Report format.
    To get the info to be displayed, someone else created a Program via the GUi SE38 (Attribute is an Executable program).  The front screen (selection screen) where the dates for which you would like to run the report for, needs to be changed.  It is not a nice screen to look at.  On that same screen which I would like to change, is a submit button.  If you click on that, it shows info and that info must not be changed at all.
    So I will also have a submit button on my new Web dynpro functionality where I am building hopefully a nicer selection screen.  I will also have a Submit button and I wanted to add something when clicking on this submit button to call the existing program that will show the info selected.
    Regards
    Debbie

  • Calling of other programs

    Can we call other executable programs from SAP.
    Eg:Can we call calculator of microsoft from SAP

    This can be done through FM 'GUI_EXEC'
    This function is only available for Windows 32 bit clients.
    COMMAND and PARAMETER are combinde into a command line that must contain the name of a program and its corresponding parameters.
    The function DOES NOT associate applications with file extensions.
    Example
    COMMAND   = 'Notepad'
    PARAMETER = 'c:\temp\test.txt'
    or
    COMMAND   = 'Notepad c:\temp\test.txt'

  • Calling a module pool program screen to an executable program

    Hi gurus,
    I have created a executable program to use selection-screen and want to see my output in module pool program where I have designed table control according to my requirement.
    How can I call the module-pool program screen from an executable program?
    Any help?
    Regards
    Mac

    Hi Mac,
    I think you can proceed with a report program alone . There you create a screen with the table control to populate your result.
    In the report program, after getting values for internal table for your display, just call the said screen.
    i.e.
    CALL SCREEN <screen number>.
    Hope this may help you.
    Regards,
    Smart Varghese

  • Calling a report from a executable program

    Hi All,
    i want to call a report which is generated by tcode CO88 from a executable program. I want to pass the values of order from the exe program only. But my requirement is such that i want co88 to process only open orders, so please suggest how can i do that.
    thanks in advance.
    Pankaj Sharma

    hi,
    chk this sample.
    *Code used to populate 'select-options' & execute report 
    DATA: seltab type table of rsparams,
          seltab_wa like line of seltab.
      seltab_wa-selname = 'PNPPERNR'.
      seltab_wa-sign    = 'I'.
      seltab_wa-option  = 'EQ'.
    load each personnel number accessed from the structure into
    parameters to be used in the report
      loop at pnppernr.
        seltab_wa-low = pnppernr-low.
        append seltab_wa to seltab.
      endloop.
      SUBMIT zreport with selection-table seltab
                                    via selection-screen.
    *Code used to populate 'parameters' & execute report 
    SUBMIT zreport with p_param1 = 'value'
                    with p_param2 = 'value'.
    Other additions for SUBMIT
    *Submit report and return to current program afterwards
    SUBMIT zreport AND RETURN.
    *Submit report via its own selection screen
    SUBMIT zreport VIA SELECTION-SCREEN.
    *Submit report using selection screen variant
    SUBMIT zreport USING SELECTION-SET 'VARIANT1'.
    *Submit report but export resultant list to memory, rather than
    *it being displayed on screen
    SUBMIT zreport EXPORTING LIST TO MEMORY.
    Once report has finished and control has returned to calling
    program, use function modules LIST_FROM_MEMORY, WRITE_LIST and
    DISPLAY_LIST to retrieve and display report.
    rgds
    anver
    if hlped pls mark points

  • How to call a Include type Report Program in Executable Program. ?

    Hi experts,
    I have created a Include type report program and I want to run this include program in other report program. Which abap statement should i use ?
    Thanks
    Saurabh

    Hi Saurabh,
    We can make use of programs of Type - Include(I) in other type of ABAP Programs.
    These Include programs cannot be executed directly but can be used as a part of the main program i.e Executable program - Type E.
    So after creating your main program of type executable program then use the below line
    REPORT ZM_SAMPLE_PROGRAM.
    INCLUDE INC_PRG_NAME.
    Now the code as availablein INC_PRG_NAME becomes part of the  main program ZM_SAMPLE_PROGRAM.le
    Also you can make use of this Include program in other executable/include programs too...
    Regards,
    Rafi

  • Calling an executable from a java program

    How can I call a compiled program from a java program. I have a fortran program, which I would like to call for execution from within my java program. My OS is linux.
    Thanks,
    An

    Not quite sure in the case of fortran program, but one thing can be done, call ur fortran program from a batch (.bat file) and call this .bat file from java ;
    try {
    Process p = Runtime.getRuntime().exec("run.bat");
    p.waitFor();
    catch( Exception e ) {
    }

  • How to call a Dialog Program from another Dialog Program

    Dear All,
    How can I call a dialog program with return value from another dialog program?
    Regards,
    Alok.

    Hi Alok,
    1. Insted of creating 2 different Dialog program. It's good to create as many screens as you want in same module pool program. Any way you can use the different TCODE for each screen.
    2. Another and The best way is to create a function group and then inside function group use the function 2 module... In the function group define a global variable which will be present for both the function group if they are getting executed in sequence. and inside the Function Module call the screens using command " call screen <screenno>".
    3. You can use set / get parameter to pass values of a field between two dynpro program.

  • Call to concurrent program in a pl/sql block does not COMMIT data to table

    I have the following PL/SQL block.
                             apps.create_po(x_org_id,x_document_num,x_agent_name,x_vendor_id,x_vendor_site_id,x_ship_to_location,x_bill_to_location,x_creation_date,new_isbn,new_print_key,new_unit_setup_cost,new_unit_run_cost,x_item,x_category_id,x_item_description,x_unit_of_measure,x_quantity,x_unit_price,x_ship_to_org_id,x_promise_date,x_qty_rcv_tolerance, x_deliver_to_location,x_destination_org_id, x_destination_subinventory,x_segment2,x_segment4);
                                  COMMIT;
    FND_GLOBAL.APPS_INITIALIZE(v_user_id,v_resp_id,201);
    v_po_req_id := apps.fnd_request.submit_request('PO','POXPOPDOI',NULL,NULL,NULL,
                                  NULL,'STANDARD',NULL,'Y',NULL,'APPROVED',NULL,NULL,NULL,NULL,NULL,NULL,
                                  NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
                                  NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
                                  NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
                                  NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
                                  NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
                                  NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
                                  NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
                                  NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
                                  NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL
                                  DBMS_OUTPUT.PUT_LINE('Request ID is:' || v_po_req_id);
                                  IF v_po_req_id <> 0 THEN
                                       dbms_lock.sleep(60);
                                       dbms_output.Put_line('Sleep executed');
                                       COMMIT;
                                       select PHASE_CODE,STATUS_CODE INTO v_phase_code,v_status_code
                                       FROM FND_CONCURRENT_REQUESTS
                                       WHERE REQUEST_ID = v_po_req_id;
                                       dbms_output.put_line('After commit Phase and status codes are = '||v_phase_code || v_status_code);
                                  ELSE
                                       ROLLBACK;
                                  END IF;
                                  dbms_output.put_line('New Po is' || x_document_num);
                                  dbms_output.put_line('Quantity Is'|| x_quantity);
                                  apps.receive_po(x_document_num,x_quantity);
                                  v_rcv_req_id := apps.fnd_request.submit_request('PO','RVCTP',NULL,NULL,NULL,
                                  'BATCH',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
                                  NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
                                  NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
                                  NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
                                  NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
                                  NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
                                  NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
                                  NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
                                  NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
                                  NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL
                                  DBMS_OUTPUT.PUT_LINE('Request ID is:' || v_rcv_req_id);
                                  IF v_rcv_req_id <> 0 THEN
                                       COMMIT;
                                       DBMS_OUTPUT.PUT_LINE('COMMITED RECEIVING');
                                  ELSE
                                       ROLLBACK;
                                  END IF;
    Presently when this block runs, i can see the new PO number created. Commit is also successfully executed. The last output for the program is
    New Po is 20651
    Quantity Is 450
    But due to some reason, the receiving program(receive_po) cannot retrieve the same PO from the base table.
    But once this pl/sql block is complete, and i call the receving procedure from a different session, the Po is retrieved and receiving against the PO is executed successfully.
    Can someone please suggest a work around ? Is the code missing something ? Since POXPOPDOI is a concurrent program which is executed as an asyncronous process, the commit statement after the call to concurent program does not work but the commit is executed only after it exits the pl/sql block.

    Thanks for responding.
    receive_po() program just inserts the data into RCV_HEADERS_INTERFACE and RCV_TRANSACTIONS_INTERFACE tables based on the PO that is created in the previous step. So basically the new PO created has to be received and the receive_po() just inserts data into the interface tables so that RVCTP can be called after that for receiving.
    Here is the code for the procedure.
    SET SERVEROUTPUT ON;
    --FND_GLOBAL.APPS_INITIALIZE(3,20707,201);
    --Procedure for receiving interface to load data to RCV_HEADERS_INTERFACE and RCV_TRANSACTIONS_INTERFACE
    CREATE OR REPLACE PROCEDURE receive_po (x_ponum IN VARCHAR2,x_quantity IN NUMBER) AS
    v_vendor_site_id NUMBER;
    v_vendor_id NUMBER;
    v_agent_id NUMBER;
    v_ship_to_organization_id NUMBER;
    v_item_id NUMBER;
    v_uom_code varchar2(25);
    v_subinventory varchar2(25);
    v_ship_to_location_id NUMBER;
    BEGIN
    --header information in variables
    dbms_output.put_line('Entering Receiving Insert Procedure');
    dbms_output.put_line('Po number ='||x_ponum||'$');
    dbms_output.put_line('Quantity is ='||x_quantity||'$');
    select pvsa.vendor_site_id into v_vendor_site_id
    FROM po_headers_all pha,po_vendors pv, po_vendor_sites_all pvsa
    where pha.vendor_id = pv.vendor_id
    and pv.vendor_id = pvsa.vendor_id
    and pha.segment1 = x_ponum;
    dbms_output.put_line('Vendor Site ID is' ||v_vendor_site_id);
    select pv.vendor_id into v_vendor_id
    FROM po_headers_all pha,po_vendors pv, po_vendor_sites_all pvsa
    where pha.vendor_id = pv.vendor_id
    and pv.vendor_id = pvsa.vendor_id
    and pha.segment1 = x_ponum;
    dbms_output.put_line('Vendor ID is' ||v_vendor_id);
    select plla.SHIP_TO_ORGANIZATION_ID into v_ship_to_organization_id
    from PO_HEADERS_ALL pha, PO_LINE_LOCATIONS_ALL plla
    where pha.PO_HEADER_ID = plla.PO_HEADER_ID
    and pha.segment1 = x_ponum;
    dbms_output.put_line('Ship to org is' ||v_ship_to_organization_id);
    select agent_id into v_agent_id
    FROM po_headers_all
    WHERE segment1 = x_ponum;
    dbms_output.put_line('Agent ID is' ||v_agent_id);
    --printing header table information
    dbms_output.put_line('vendor id is:'||v_vendor_id);
    dbms_output.put_line('vendor site id is:'||v_vendor_site_id);
    dbms_output.put_line('agent id is:'||v_agent_id);
    dbms_output.put_line('ship to organization id is:'||v_ship_to_organization_id);
    --line information in variables
    --derive item id
    select pla.item_id into v_item_id
    from po_headers_all pha, po_lines_all pla
    where pha.po_header_id = pla.po_header_id
    and pha.org_id = pla.org_id
    and pha.segment1 = x_ponum;
    --derive uom
    select pla.unit_meas_lookup_code into v_uom_code
    from po_headers_all pha, po_lines_all pla
    where pla.po_header_id = pha.po_header_id
    and pla.org_id = pha.org_id
    and pha.segment1 = x_ponum;
    --derive subinventory
    select pda.destination_subinventory into v_subinventory
    from po_headers_all pha, po_lines_all pla,po_distributions_all pda
    where pha.po_header_id = pla.po_header_id
    and pla.po_header_id = pda.po_header_id
    and pla.po_line_id = pda.po_line_id
    and pha.org_id = pla.org_id
    and pla.org_id = pda.org_id
    and pha.segment1 = x_ponum;
    --derive ship to location id
    select ship_to_location_id into v_ship_to_location_id
    from po_headers_all
    where segment1 = x_ponum;
    --printing transaction table details
    dbms_output.put_line('item id is:'||v_item_id);
    dbms_output.put_line('UOM is:'||v_uom_code);
    dbms_output.put_line('subinventory is:'||v_subinventory);
    dbms_output.put_line('ship to location id is:'||v_ship_to_location_id);
    --insert data into the receiving interface header table
    INSERT INTO RCV_HEADERS_INTERFACE
    HEADER_INTERFACE_ID          ,
    GROUP_ID               ,
    PROCESSING_STATUS_CODE      ,
    RECEIPT_SOURCE_CODE          ,
    TRANSACTION_TYPE          ,
    LAST_UPDATE_DATE          ,
    LAST_UPDATED_BY          ,
    LAST_UPDATE_LOGIN,
    CREATION_DATE               ,
    CREATED_BY               ,
    VENDOR_ID               ,
    VENDOR_SITE_ID               ,
    SHIP_TO_ORGANIZATION_ID ,
    EXPECTED_RECEIPT_DATE          ,
    EMPLOYEE_ID               ,
    VALIDATION_FLAG          
    SELECT
    RCV_HEADERS_INTERFACE_S.NEXTVAL,
    RCV_INTERFACE_GROUPS_S.NEXTVAL,
    'PENDING',
    'VENDOR',
    'NEW', -- 'CANCEL',
    sysdate,
    3,
    3,
    sysdate,
    3,
    v_vendor_id,
    v_vendor_site_id,
    v_ship_to_organization_id,
    sysdate+5,
    v_agent_id,
    'Y'
    FROM DUAL;
    commit;
    --insert data into the interface transaction table
    for i in 1..1 loop
    INSERT INTO RCV_TRANSACTIONS_INTERFACE
    (INTERFACE_TRANSACTION_ID     ,
    HEADER_INTERFACE_ID     ,
    GROUP_ID               ,
    LAST_UPDATE_DATE          ,
    LAST_UPDATED_BY          ,
    CREATION_DATE               ,
    CREATED_BY               ,
    LAST_UPDATE_LOGIN,
    TRANSACTION_TYPE          ,
    TRANSACTION_DATE          ,
    PROCESSING_STATUS_CODE      ,
    PROCESSING_MODE_CODE          ,
    TRANSACTION_STATUS_CODE     ,
    QUANTITY               ,
    UNIT_OF_MEASURE          ,
    ITEM_ID ,
    AUTO_TRANSACT_CODE          ,
    RECEIPT_SOURCE_CODE          ,
    SOURCE_DOCUMENT_CODE          ,
    SUBINVENTORY               ,
    DOCUMENT_NUM               ,
    SHIP_TO_LOCATION_ID           ,
    VALIDATION_FLAG
    SELECT
    RCV_TRANSACTIONS_INTERFACE_S.NEXTVAL,
    RCV_HEADERS_INTERFACE_S.CURRVAL,
    RCV_INTERFACE_GROUPS_S.CURRVAL,
    SYSDATE,
    3,
    SYSDATE,
    3,
    3,
    'RECEIVE', --'RECEIVE', -- 'SHIP', --'06-JAN-1998',--question here
    sysdate,
    'PENDING',
    'BATCH',
    'PENDING',
    x_quantity,
    v_uom_code,
    v_item_id,
    'DELIVER', -- 'RECEIVE', --'DELIVER',
    'VENDOR',
    'PO',
    v_subinventory,
    x_ponum,
    v_ship_to_location_id,
    'Y'
    FROM DUAL;
    end loop;
    commit;
    END receive_po;
    I am really stuck and looking out for work arond. Please help.
    Thanks,
    Natasha

  • How can we call a C program in Labview

    Hi
    a) In one of our application we have to call a C progran in Labview. I am not able to call it. Can somebody help me.
    b) When we call a C program ,is  Labview makes block diagram for it.
    Please reply
    Thanking You

    hi there
    well, then we need more information what you mean with a "C program". are you talking about C source code, a command line executable, a high end executable with a GUI, a dll, ActiveX.... what are the parameters you have to pass? what parameters are returned from the "C program"? please post some code....
    as a startup you could search the examples shipped with LV. open the example finder from the runtime menu.
    Best regards
    chris
    CL(A)Dly bending G-Force with LabVIEW
    famous last words: "oh my god, it is full of stars!"

  • Can we call a report program or schemas in  Routine [dynamic action] ???

    Dear SAP Crew,
    In dynamic action, we can call routines through indicatiors.
    In that routine, Can we call a report program or schemas???
    Kindly clarify with some scenario.
    Thks & Rgds
    Krish Sathya

    Hi Krish,
    In the routine you should be able to SUBMIT the program/report you need to execute.
    Cheers,
    Aditya

  • Calling an external program (*.exe file) on the client

    Hi,
    I use 9iDS and I'd like to call an external program (*.exe file) on the client, but this exe file is located on the server not on the client.
    So it should be something like a mixture between host and client_host(webutil) command. Is it possible to use client_host where a virtual path is passed to?
    Regards Sören

    Are you saying you want to run on the exe on the client but its located on the server???
    In that case you would have to do a webutil file transfer to move it to the client before executing. Or, if you are calling a DLL, webutil will download it automatically from the server to the client (see the C API example on the webutil page).
    Regards
    Grant Ronald
    Forms Product Management

  • How to call a external program in java?

    Help!!
    Is there any method that can a java program can call a external program? For example execute a exe file.
    Thanks.

    Yes.
    Runtime.getRuntime().exec("exactly what you would type at the command line");
    But be aware that this is operating-system-specific and full of gotchas. When you run into one of them, come back to the forum and do a search, this is a frequent topic of discussion.

  • Need to track Function modules called when executing a transaction

    Hi All,
              Is there a way through which i can track function modules called, while executing a Transaction. Kindly provide pointers to it.
    Thanks in advance.
    Regards,
    Navin.

    Goto SE80 Transaction and use Program name for corresponding Transaction Use Find operation like Call Function .. then you will get list of FM ..
    There is no other option .
    reward Points if it is helpful
    Thanks
    Seshu

Maybe you are looking for

  • How I was able to log into Apple Support Forums (Finally)

    To make a long story short I ended up having to make a new Apple ID for several reasons. Fortunately this was fine for me considering I did not have any purchased items or funds still left on my old account. One thing I haven noticed which is a huge

  • Missing Commenting Toolbar for Acrobat Reader 9.3

    Our company's standard desktop PCs run Acrobat 9.3.4 , Windows XP SPII (still), and IE 8.0 I have 2 PDF files, with the same Reader Extensions applied to both (commenting). The source of the PDF files was from Autocad (plant drawings). They are produ

  • How to collapse unused text field in PDF form

    Hi all, may i know how to collapse unused text field in a PDF form. Etc, we have alot of description line for user to enter the info, but some line will be left unused, so i was wondering whether can i hide those unused text field. But when i need th

  • How to call java script function from JSP ?

    how to call java script function from JSP ?

  • Compile Error: 'class' or 'interface' expected

    Hi all, I have a code which was compiling/running successfully: import java.net.*; code When I added the line: import java.io.*; import java.net.*; import java.io.*; code Got the following compile error: 'class' or 'interface' expected import java.io