Calling r/3 program from process chain

Hi
I did the following steps to call r3 program from process chain :
Steps in R/3 system
1. Created a program  which needs to be called from bw and at the end of the program i have calling 'RSPC_ABAP_FINISH' function module & passing the rfc id of bw system and bw process variant.
2. created a even in r/3 (please note that this is not there in bw)
3. Created a job  and  under start condiion selected 'after event' and mentioned the event created earlier. And under step1 enter the abap program to be executed
Steps in BW system :
1. Created a process chain
2. inserted a process type 'abap program' and selected the call mode 'Asynchronous' and under destination entered the RFC destination of R/3 system. Under scheduled program enterd the event name created in R/3
after executing above process chain,  the abap program node is becoming green but the abap program is not getting executed in r/3 system. And also the process after the program node in process chain is not getting executed.  The job which was created in r/3 still showing the released status
Kindly advice where i am wrong.
Thanks
RKS

any input

Similar Messages

  • Call an ABAP program from process chain

    Hi experts,
    How do I include an abap program in R/3 sandbox in my process chain in BW.
    I know how to do it in BW but this program is in the ECC sandbox.
    what I did was to create a job in R3 through SM36,this job had two steps one to run my program and another step to call the FM RSPC_ABAP_FINISH,which would inform the PC that the job is executed and continue to the next step.
    I was triggering this job trough an event in R3.
    In my PC I added a process type ABAP program,where i made an asynchronous call to the event in the ecc sandbox.
    But this is not working.Any ideas?
    Regards
    Ankit

    Hi Mario,
    Would RSPC_API_CHAIN_START work?

  • Trigger abap program from process chain

    hello...i have an external source system which is a SAP client, I have a table with the fields i wanted, when the field of the table change to "ctmd end", the abap program in this source client will trigger the process chain in SAP BW and the selection of the infopackage which is a business date will be triggered as well to load the data based on the business key date in the source systems. I am new in abap program and wanna know can this be done so? If can, how can this be done? Thanks!

    generate an event through ABAP program and use that event to trigger that start process type of that process chain
    -- Amit

  • Can we call Function Module from Process Chain?

    Hello experts,
    I have a small question.
    Can we call Function Module(SE37) from Process Chain?
    If yes can you please provide some example link?
    I m new to BI world.
    regards

    Hi,
    Create one ABAP program and call the function module from that program. Check the link to know how to call a function module from an ABAP program.
    http://help.sap.com/saphelp_wp/helpdata/en/d1/801edb454211d189710000e8322d00/content.htm
    http://help.sap.com/saphelp_wp/helpdata/en/9f/db98ef35c111d1829f0000e829fbfe/content.htm
    Then use process type "ABAP Program" in your process chain and add the program you have created. So then this program will be executed via process chain and this program will call the function module.
    Indrashis

  • How to integrate an ABAP program in process chain

    Hello Experts :
    I need to call an ABAP program in PROCESS CHAIN from a different system, using Process type "ABAP program", option "scheduled program".
    Sombebody have the step by step or some examples
    Regards,
    Diana

    If you search this forum for RSPC_ABAP_FINISH you will find some good answers such as:
    Start an ABAP program in R/3 from a process chain in BW

  • Call ABAP Program in Process Chain

    Dear BW Gurus,
    I need to call an Process chain which includes ABAP Program.
    The ABAP Program doesn't have the variants but it accepts the inputs from the user and sets into a YXXXX table.
    I am not getting how to proceed in this regard.
    Kindly guide.
    Best Regards,
    Harsh

    hi,
    chk these links below.. they contain the resolution for your query
    Call ABAP Program in Process Chain
    ABAP in Process Chains
    Also chk this relase which ia an entire guiding one to ABAP Program in Process Chain
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3507aa90-0201-0010-6891-d7df8c4722f7

  • Log from ABAP program in Process chain

    Hello.
    I have some problem. I wrote the ABAP program and insert this program in process chain. This program a correctly work, but I canu2019t view the steps of work this program. In help:
    You can write logs by outputting success messages. (Error messages terminate the task!)
    Example: MESSAGE s051(rsar) WITH 'Process successfully ended'.
    You can see these logs on the tab page Batch in the detail monitors of the process chain.
    I append this code to my program, but nothing in process chain.
    Help me, please - what code I need to insert in my program so that view this message in a process chain logs?

    We have an ABAP that outputs a message.  The output from the following code is visible when you click on a process chain step icon, and select the middle tab that says "Backg" for background.
    IF sy-subrc = 0.
        CONCATENATE text-005 p_date INTO l_msg SEPARATED BY space.
        MESSAGE i162(00) WITH l_msg.
      ELSE.
        CONCATENATE text-003 p_date INTO l_msg SEPARATED BY space.
        MESSAGE e162(00) WITH l_msg.
      ENDIF.

  • How to call program through process chain

    Hi Gurus,
    I am in the position to execute the abap program through process chain, I have used  abap program as process type in process chain(First time I am using this process type).when I am executing the process chain, the abap program is not executing.Eagerly anticipating your reply.
    Regards
    Shiva

    Hi
    I managed the execution of rscrm jobs in PC as follows:
    1. Execute query through RSCRM_BAPI transaction
    2. goto sm37 and copy the Jobname (the active one)
    3. Create following progromm
    *& Report /WST/RSCRM_START *
    REPORT /WST/RSCRM_START .
    parameter: l_bid TYPE sysuuid_c.
    CALL METHOD cl_rscrmbw_bapi=>exec_rep_in_batch
    EXPORTING
    i_barepid = l_bid
    4. Execute Programm and fill the Parameter with the Jobname
    5. Save as a new program variant and use in PC as a normal program
    I hope that helps.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/3507aa90-0201-0010-6891-d7df8c4722f7
    regards
    ashwin

  • Can we call a bdc program from a report?how

    hi
    experts can u help me for this

    Hi
    Yes, You can call a BDC program from Report.
    see the sample report in which it is used
    REPORT zm_reservation_alert
    NO STANDARD PAGE HEADING
    MESSAGE-ID zm_msg.
    D A T A B A S E T A B L E S D E C L A R A T I O N
    T Y P E S D E C L A R A T I O N S
    Reservations Main Structure
    TYPES: BEGIN OF s_res,
    rsnum TYPE rsnum, " Reservation No
    rspos TYPE rspos, " Item No
    usnam TYPE usnam, " User Name
    bwart TYPE bwart, " Movement Type
    aufnr TYPE aufnr, " Order Number
    rsart TYPE rsart, " Record Type
    bdart TYPE bdart, " Reservation Type
    matnr TYPE matnr, " Material No
    bdter TYPE bdter, " Req Date
    menge TYPE menge_d, " Quantity
    kostl TYPE kostl, " Cost Center
    usrid TYPE sysid, " User ID
    END OF s_res.
    Output Main Structure
    TYPES: BEGIN OF s_rep,
    usnam TYPE usnam, " User Name
    rsnum TYPE rsnum, " Reservation No
    rspos TYPE rspos, " Item No
    matnr TYPE matnr, " Material No
    bdter TYPE bdter, " Req Date
    menge TYPE menge_d, " Quantity
    kostl TYPE kostl, " Cost Center
    aufnr TYPE aufnr, " Order Number
    END OF s_rep.
    User Dept Details
    TYPES: BEGIN OF s_dept,
    pernr TYPE persno, " Personal No
    usrid TYPE sysid, " User ID
    orgeh TYPE orgeh, " Orgn Unit
    orgtx TYPE orgtx, " Dept Name
    END OF s_dept.
    For Send Mail Purpose
    DATA : i_doc_data LIKE sodocchgi1.
    DATA : BEGIN OF i_pack_list OCCURS 0.
    INCLUDE STRUCTURE sopcklsti1.
    DATA : END OF i_pack_list.
    DATA : BEGIN OF i_receivers OCCURS 0.
    INCLUDE STRUCTURE somlreci1.
    DATA : END OF i_receivers.
    DATA : BEGIN OF i_contents OCCURS 0.
    INCLUDE STRUCTURE solisti1.
    DATA : END OF i_contents.
    DATA : BEGIN OF i_header OCCURS 0.
    INCLUDE STRUCTURE solisti1.
    DATA : END OF i_header.
    DATA : BEGIN OF i_att OCCURS 0.
    INCLUDE STRUCTURE solisti1.
    DATA : END OF i_att.
    Internal table for bdcdata
    DATA : it_bdcdata LIKE bdcdata OCCURS 0 WITH HEADER LINE.
    Internal table to handle messages
    DATA : it_messages LIKE bdcmsgcoll OCCURS 0 WITH HEADER LINE.
    D A T A D E C L A R A T I O N S
    DATA: gv_lines TYPE sy-index, " Total Lines int Table
    gv_days TYPE i, " Difference Days
    gv_date TYPE sy-datum, " Date
    gv_date1 TYPE sy-datum, " Date
    gv_date2 TYPE sy-datum, " Date
    gv_text(85), " Text Field
    gv_mesg(70), " Error Messages
    gv_bdc, " BDC Flag
    gv_flag TYPE i, " Flag
    gv_ernam TYPE ernam. " User ID
    C O N S T A N T S D E C L A R A T I O N S
    CONSTANTS: c_x VALUE 'X', " Flag
    c_endda TYPE endda VALUE '99991231'. " Date
    I N T E R N A L T A B L E S D E C L A R A T I O N S
    DATA: i_res TYPE STANDARD TABLE OF s_res WITH HEADER LINE, " Reservns
    i_dept TYPE STANDARD TABLE OF s_dept WITH HEADER LINE, " Dept
    i_rep TYPE STANDARD TABLE OF s_rep WITH HEADER LINE. " Output
    S T A R T - O F - S E L E C T I O N *
    START-OF-SELECTION.
    Fetch main data
    PERFORM fetch_data.
    Process data
    PERFORM process_data.
    *& Form fetch_data
    Fetching the Reservations related data from Database Tables
    FORM fetch_data .
    CLEAR: gv_date, gv_date1, gv_date2.
    gv_date = sy-datum.
    gv_date1 = sy-datum - 10.
    gv_date2 = sy-datum + 10.
    CLEAR i_res.
    REFRESH i_res.
    SELECT a~rsnum " Reservation No.
    b~rspos " Reservation Item
    a~usnam " User Name
    a~bwart " Movement Type
    a~aufnr " Order Number
    b~rsart " Record Type
    b~bdart " Reservation Type
    b~matnr " Material No
    b~bdter " Req Date
    INTO TABLE i_res
    FROM rkpf AS a JOIN resb AS b
    ON arsnum = brsnum
    WHERE ( b~bdter BETWEEN gv_date1 AND gv_date2 ) AND
    b~xloek EQ ' '.
    SORT i_res BY rsnum rspos.
    DELETE ADJACENT DUPLICATES FROM i_res COMPARING matnr.
    Add userid into the i_usr int table
    LOOP AT i_res.
    i_res-usrid = i_res-usnam.
    MODIFY i_res INDEX sy-tabix.
    ENDLOOP.
    IF NOT i_res[] IS INITIAL.
    Get the User Dept Name
    CLEAR i_dept.
    REFRESH i_dept.
    SELECT a~pernr " Personal No
    a~usrid " User ID
    b~orgeh " Orgn Unit
    c~orgtx " Dept Name
    INTO TABLE i_dept
    FROM pa0105 AS a JOIN pa0001 AS b
    ON apernr = bpernr JOIN t527x AS c
    ON borgeh = corgeh
    FOR ALL ENTRIES IN i_res
    WHERE a~usrid = i_res-usrid AND
    a~endda EQ c_endda AND
    b~endda EQ c_endda.
    ENDIF.
    SORT i_dept BY pernr.
    DELETE ADJACENT DUPLICATES FROM i_dept COMPARING pernr.
    Move the Creator of Reservation to a diff table
    LOOP AT i_res.
    MOVE-CORRESPONDING i_res TO i_rep.
    APPEND i_rep.
    CLEAR i_rep.
    ENDLOOP.
    SORT i_rep BY usnam rsnum rspos.
    ENDFORM. " Fetch_Data
    *& Form process_data
    Process the Reservations related data for Expiry Date
    FORM process_data .
    DATA: lv_date1 LIKE sy-datum,
    lv_date2 LIKE sy-datum,
    lv_date3(10),
    lv_menge(13),
    lv_tabix LIKE sy-tabix.
    LOOP AT i_rep.
    CLEAR: gv_days, gv_text, lv_date1, lv_date2,lv_date3.
    lv_tabix = sy-tabix.
    AT NEW usnam.
    Populate the Contents Table
    CLEAR i_att.
    REFRESH i_att.
    i_att = 'Reservations Reminder'(014).
    APPEND i_att.
    i_att = '----
    APPEND i_att.
    i_att-line = ' '.
    APPEND i_att.
    READ TABLE i_dept WITH KEY usrid = i_rep-usnam.
    CONCATENATE 'Name:'(003) i_rep-usnam 'Dept:'(015) i_dept-orgtx
    INTO i_att-line SEPARATED BY space.
    APPEND i_att.
    i_att-line = ' '.
    APPEND i_att.
    i_att = 'Please find the List of expiring Reservations'(004).
    APPEND i_att.
    i_att-line = ' '.
    APPEND i_att.
    CONCATENATE '--' '' '--
    ' INTO
    i_att-line SEPARATED BY space.
    APPEND i_att.
    CONCATENATE 'Reservation #'(006) 'Material #'(007) ' Quantity'(002)
    'Due Date'(008) 'Work Center/CC'(005) INTO
    i_att-line SEPARATED BY space.
    APPEND i_att.
    CONCATENATE '--' '' '--
    ' INTO
    i_att-line SEPARATED BY space.
    APPEND i_att.
    i_att-line = ' '.
    APPEND i_att.
    ENDAT.
    gv_days = i_rep-bdter - gv_date.
    lv_date1 = i_rep-bdter + 5.
    lv_date2 = i_rep-bdter + 10.
    MOVE i_rep-menge TO lv_menge.
    WRITE i_rep-bdter TO lv_date3.
    IF gv_days = 10.
    IF i_rep-aufnr <> space.
    CONCATENATE i_rep-rsnum i_rep-matnr lv_menge lv_date3
    i_rep-aufnr 'is due for 10 days. Please collect'(009)
    INTO gv_text SEPARATED BY space.
    ELSE.
    CONCATENATE i_rep-rsnum i_rep-matnr lv_menge lv_date3
    i_rep-kostl 'is due for 10 days. Please collect'(009)
    INTO gv_text SEPARATED BY space.
    ENDIF.
    i_att-line = gv_text.
    APPEND i_att.
    CLEAR i_att.
    CLEAR gv_text.
    ENDIF.
    IF gv_days = 5.
    IF i_rep-aufnr <> space.
    CONCATENATE i_rep-rsnum i_rep-matnr lv_menge lv_date3
    i_rep-aufnr 'is due for 5 days. Please collect'(010)
    INTO gv_text SEPARATED BY space.
    ELSE.
    CONCATENATE i_rep-rsnum i_rep-matnr lv_menge lv_date3
    i_rep-kostl 'is due for 5 days. Please collect'(010)
    INTO gv_text SEPARATED BY space.
    ENDIF.
    i_att-line = gv_text.
    APPEND i_att.
    CLEAR i_att.
    CLEAR gv_text.
    ENDIF.
    IF gv_date = lv_date1.
    IF i_rep-aufnr <> space.
    CONCATENATE i_rep-rsnum i_rep-matnr lv_menge lv_date3
    i_rep-aufnr 'is getting cancelled on'(011) lv_date2
    INTO gv_text SEPARATED BY space.
    ELSE.
    CONCATENATE i_rep-rsnum i_rep-matnr lv_menge lv_date3
    i_rep-kostl 'is getting cancelled on'(011) lv_date2
    INTO gv_text SEPARATED BY space.
    ENDIF.
    i_att-line = gv_text.
    APPEND i_att.
    CLEAR i_att.
    CLEAR gv_text.
    ENDIF.
    IF gv_date = lv_date2.
    IF i_rep-aufnr <> space.
    CONCATENATE i_rep-rsnum i_rep-matnr lv_menge lv_date3
    i_rep-aufnr 'is being cancelled'(012)
    INTO gv_text SEPARATED BY space.
    ELSE.
    CONCATENATE i_rep-rsnum i_rep-matnr lv_menge lv_date3
    i_rep-kostl 'is being cancelled'(012)
    INTO gv_text SEPARATED BY space.
    ENDIF.
    i_att-line = gv_text.
    APPEND i_att.
    CLEAR i_att.
    CLEAR gv_text.
    Mark the Reservation Item 'DELETED' using BDC.
    UPDATE resb SET xloek = c_x.
    PERFORM delete_item_resb.
    ENDIF.
    AT END OF usnam.
    IF ( gv_days = 10 OR gv_days = 5 OR gv_date = lv_date1 OR
    gv_date = lv_date2 ).
    Read the User who creates the Reservn and send a mail alert to him
    CLEAR : i_receivers,gv_ernam.
    REFRESH: i_receivers.
    READ TABLE i_rep INDEX lv_tabix.
    gv_ernam = i_rep-usnam.
    IF gv_ernam <> space.
    Send mail Alert to PR Creator(SAP inbox)
    PERFORM send_alert_data.
    Send Mail to External Mail ID of the SAP USER
    PERFORM send_mail_external.
    ENDIF.
    ENDIF.
    ENDAT.
    ENDLOOP.
    ENDFORM. " Process_data
    *& Form delete_item_resb
    Set the Deletion Indicator for the Res. Item in RESB
    FORM delete_item_resb.
    gv_bdc = 'N'.
    Perform to fill it_bdcdata.
    PERFORM fill_it_bdcdata.
    Call the Transaction MB22
    CALL TRANSACTION 'MB22' USING it_bdcdata MODE 'A' UPDATE 'S'
    MESSAGES INTO it_messages.
    IF sy-subrc <> 0.
    gv_flag = 1.
    If error occurs in transaction mode run bdc session for that data
    PERFORM bdc_process.
    ENDIF.
    Handles error messages
    PERFORM error_messages.
    CLEAR : it_bdcdata, it_messages.
    REFRESH : it_bdcdata, it_messages.
    IF gv_bdc = 'O'.
    close bdc if it is open
    PERFORM close_bdc.
    ENDIF.
    ENDFORM. "delete_item_resb
    *& Form FILL_IT_BDCDATA
    Filling Bdcdata structure with data
    FORM fill_it_bdcdata.
    PERFORM bdc_dynpro USING 'SAPMM07R' '0560'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'RM07M-RSPOS'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '/00'.
    PERFORM bdc_field USING 'RM07M-RSNUM'
    i_rep-rsnum.
    PERFORM bdc_field USING 'RM07M-RSPOS'
    i_rep-rspos.
    PERFORM bdc_dynpro USING 'SAPMM07R' '0510'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'RESB-XLOEK'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '/00'.
    PERFORM bdc_field USING 'RESB-XLOEK'
    c_x.
    PERFORM bdc_dynpro USING 'SAPLKACB' '0002'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'COBL-KOSTL'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '=ENTE'.
    PERFORM bdc_dynpro USING 'SAPMM07R' '0510'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'RESB-ERFMG'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '=BU'.
    PERFORM bdc_dynpro USING 'SAPLKACB' '0002'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'COBL-KOSTL'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '=ENTE'.
    ENDFORM. " FILL_IT_BDCDATA
    *& Form BDC_DYNPRO
    Filling the it_bdcdata table with program name & screen number
    FORM bdc_dynpro USING program LIKE bdcdata-program
    dynpro LIKE bdcdata-dynpro.
    it_bdcdata-program = program.
    it_bdcdata-dynpro = dynpro.
    it_bdcdata-dynbegin = 'X'.
    APPEND it_bdcdata.
    CLEAR it_bdcdata.
    ENDFORM. " BDC_DYNPRO
    *& Form BDC_FIELD
    Filling it_bdcdata with field name and field value
    FORM bdc_field USING fnam LIKE bdcdata-fnam
    fval.
    it_bdcdata-fnam = fnam.
    it_bdcdata-fval = fval.
    APPEND it_bdcdata.
    CLEAR it_bdcdata.
    ENDFORM. " BDC_FIELD
    *& Form ERROR_MESSAGES
    Displaying error messages
    FORM error_messages.
    CALL FUNCTION 'FORMAT_MESSAGE'
    EXPORTING
    id = sy-msgid
    lang = sy-langu
    IMPORTING
    msg = gv_mesg
    EXCEPTIONS
    not_found = 1
    OTHERS = 2.
    LOOP AT it_messages WHERE msgtyp = 'E'.
    WRITE : / 'Message :'(001) ,gv_mesg.
    CLEAR it_messages.
    ENDLOOP.
    ENDFORM. " ERROR_MESSAGES
    *& Form BDC_PROCESS
    Open bdc session if call transaction fails
    FORM bdc_process.
    IF gv_bdc = 'N'.
    open bdc session
    PERFORM open_bdc.
    gv_bdc = 'O'.
    ENDIF.
    IF gv_bdc = 'O'.
    insert data into bdc session
    PERFORM insert_bdc.
    ENDIF.
    ENDFORM. " BDC_PROCESS
    *& Form OPEN_BDC
    Calling function module to open bdc session
    FORM open_bdc.
    CALL FUNCTION 'BDC_OPEN_GROUP'
    EXPORTING
    client = sy-mandt
    group = 'ZMM'
    keep = 'X'
    user = sy-uname
    EXCEPTIONS
    client_invalid = 1
    destination_invalid = 2
    group_invalid = 3
    group_is_locked = 4
    holddate_invalid = 5
    internal_error = 6
    queue_error = 7
    running = 8
    system_lock_error = 9
    user_invalid = 10
    OTHERS = 11.
    ENDFORM. " OPEN_BDC
    *& Form INSERT_BDC
    Insert it_bdcdata into bdc by calling function module bdc_insert
    FORM insert_bdc.
    CALL FUNCTION 'BDC_INSERT'
    EXPORTING
    tcode = 'MB22'
    TABLES
    dynprotab = it_bdcdata
    EXCEPTIONS
    internal_error = 1
    not_open = 2
    queue_error = 3
    tcode_invalid = 4
    printing_invalid = 5
    posting_invalid = 6
    OTHERS = 7.
    ENDFORM. " INSERT_BDC
    *& Form CLOSE_BDC
    Closing bdc session
    FORM close_bdc.
    CALL FUNCTION 'BDC_CLOSE_GROUP'
    EXCEPTIONS
    not_open = 1
    queue_error = 2
    OTHERS = 3.
    ENDFORM. " CLOSE_BDC
    *& Form send_alert_data
    Send Alert for the Expired Contract
    FORM send_alert_data .
    CLEAR: gv_lines,i_receivers, i_header, i_contents,i_doc_data.
    REFRESH : i_receivers,i_header,i_contents.
    DESCRIBE TABLE i_att LINES gv_lines.
    i_receivers-receiver = gv_ernam.
    i_receivers-receiver = 'SSHEIK'.
    i_receivers-rec_type = 'B'.
    i_receivers-rec_date = sy-datum.
    i_receivers-express = 'X'.
    i_receivers-com_type = 'INT'.
    i_receivers-notif_del = 'X'.
    APPEND i_receivers.
    i_doc_data-obj_name = 'SAPoffice'(013).
    i_doc_data-obj_descr = 'Reservations Reminder'(014).
    i_doc_data-obj_langu = 'E'.
    i_doc_data-no_change = c_x.
    i_doc_data-obj_prio = 1.
    i_doc_data-priority = 1.
    i_doc_data-doc_size = ( gv_lines - 1 ) * 255 + 135.
    i_pack_list-transf_bin = c_x.
    i_pack_list-head_start = '1'.
    i_pack_list-head_num = '1'.
    i_pack_list-body_start = '1'.
    i_pack_list-body_num = gv_lines.
    i_pack_list-doc_type = 'DOC'.
    i_pack_list-obj_name = 'SAPoffice'(013).
    i_pack_list-obj_descr = 'Reservations Reminder'(014).
    i_pack_list-obj_langu = 'E'.
    i_pack_list-doc_size = ( gv_lines - 1 ) * 255 + 135.
    APPEND i_pack_list.
    i_header-line = 'Header'. APPEND i_header.
    Data for contents
    i_contents-line = 'Please find the Reservations Due List'(016).
    APPEND i_contents.
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
    document_data = i_doc_data
    PUT_IN_OUTBOX = 'X'
    IMPORTING
    SENT_TO_ALL =
    NEW_OBJECT_ID =
    TABLES
    packing_list = i_pack_list
    object_header = i_header
    contents_bin = i_att
    contents_txt = i_contents
    receivers = i_receivers
    EXCEPTIONS
    too_many_receivers = 1
    document_not_sent = 2
    document_type_not_exist = 3
    operation_no_authorization = 4
    parameter_error = 5
    x_error = 6
    enqueue_error = 7
    OTHERS = 8.
    IF sy-subrc = 0.
    MESSAGE i000 WITH 'Mail Sucessfully sent'(017).
    ELSE.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    ENDFORM. " send_alert_data
    *& Form send_mail_external
    Send mail to External MAIL ID of the PR Creator
    FORM send_mail_external.
    DATA : lv_str(24), lv_str1(40),
    lv_pernr LIKE adr6-persnumber,
    lv_adrnr LIKE adr6-addrnumber,
    lv_usrid LIKE pa0105-usrid,
    lv_mail LIKE adr6-smtp_addr,
    lv_sendor TYPE syuname,
    lv_receiver TYPE string,
    lv_header TYPE string,
    lv_body TYPE string.
    CLEAR: lv_pernr, lv_usrid, lv_adrnr,
    lv_mail, lv_sendor, lv_receiver,
    lv_header, lv_body .
    lv_usrid = gv_ernam.
    SELECT SINGLE persnumber addrnumber FROM usr21
    INTO (lv_pernr,lv_adrnr)
    WHERE bname = lv_usrid.
    IF sy-subrc = 0.
    SELECT SINGLE smtp_addr INTO lv_mail FROM adr6
    WHERE addrnumber = lv_adrnr AND
    persnumber = lv_pernr.
    IF sy-subrc <> 0.
    CONCATENATE lv_usrid '@anc.com' INTO lv_mail.
    lv_receiver = lv_mail.
    ELSE.
    lv_receiver = lv_mail.
    ENDIF.
    lv_receiver = '[email protected]'.
    lv_sendor = 'JALKHATAM'.
    lv_header = 'Reservations Reminder'(014).
    lv_str = 'Pls check your SAP Inbox'(019).
    lv_str1 = 'for the status of Reservations Due List'(020).
    CONCATENATE lv_str lv_str1 INTO lv_body
    SEPARATED BY space.
    Call Function Module To send mail
    CALL FUNCTION 'UWSP_SEND_MAIL_TO_WEB'
    EXPORTING
    id_header = lv_header
    id_body = lv_body
    id_receiver = lv_receiver
    id_sender = lv_sendor
    ID_HTML_MAIL =
    id_commit_work = 'X'
    EXCEPTIONS
    error = 1
    OTHERS = 2.
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    ENDIF.
    ENDFORM. " send_mail_external
    <b>Reward points for useful Answers</b>
    Regards
    Ashu

  • How do I call a C++ program from Java?

    I've tried using Runtime.exec to call my C++ program from Java but I don't think I'm doing it correctly. Could someone explain how to properly use it? Here's what I'm trying (this is in an applet that is only going to be running on an intranet so only PCs in my LAN will be affected):
    Runtime runtime=runtime.getRuntime();
    Process proc =runtime.exec("mkdir C:\\Test");

    What do you expect your operating system should do with a command "mkdir"? It doesn't understand this. "mkdir" is a shell command, so you need to execute the shell:
    runtime.exec("cmd /c mkdir C:\\test");

  • DSO activation step has been failing if i activate from process chain

    Hello Frnds,
    one of the DSO activation step is failing from process chain.
    Problem : if i do the activation from PC then only it is failing
    If i do the DSO activation manually then it is fine .
    Kindly provide your suggestions on this issue.
    Thanks & regards
    Ravi

    Hello Lavanya,
    below are the logs for ur reference & process monitor is not genereated
    log from Process Tab:
    Cannot activate request 0000015877(REQU_4E3YPXSZ5F73H6ZNFZJYWMVJH) of DataStore object ZXXXX
    Activation of M records from DataStore object ZOGSDRCA terminated
    Job log:
    Job started
    Step 001 started (program RSPROCESS, variant &0000000015318, user ID ALEREMOTE)
    Cannot activate request 0000015877(REQU_4E3YPXSZ5F73H6ZNFZJYWMVJH) of DataStore object ZOGSDRCA
    Activation of M records from DataStore object ZOGSDRCA terminated
    Cannot activate request 0000015877(REQU_4E3YPXSZ5F73H6ZNFZJYWMVJH) of DataStore object ZOGSDRCA
    Activation of M records from DataStore object ZOGSDRCA terminated
    Entire chain now has status 'A'
    Process Activate DataStore Object Data, variant Activate Data ZOGSDREC has status Undefined (instance )
    Process Generate Index, variant Generated from DROPINDEX ZDELETEREC_CAUSE_INDEX has status Undefined (instance )
    Process Generate Index, variant Generated from DROPINDEX DELETE_INDEX_ZCGSDREC has status Undefined (instance )
    Process Data Transfer Process, variant ZOGSDREC -> ZCGSDREC has status Undefined (instance )
    Process Data Transfer Process, variant ZOGSDRCA -> ZCGSDRCA has status Undefined (instance )
    Process Delete Index, variant Delete Reclamation causes' index has status Undefined (instance )
    Process Delete Index, variant Delete index of ZCGSDREC Reclamations has status Undefined (instance )
    Process Start Process, variant Start Reclamation delta load has status Completed (instance 4EQ978RV7JE1BU3MT2YB20A3X)
    Process Execute InfoPackage, variant 2LIS_05_Q0NOTIF Delta has status Successfully completed (instance REQU_4EQTTCCMY2XEEPL99XGE9EECT)
    Process Execute InfoPackage, variant 2LIS_05_Q0CAUSE Delta has status Successfully completed (instance REQU_4EQG4DHZ6JD3K5UZCR5WP16P9)
    Process Data Transfer Process, variant 2LIS_05_Q0NOTIF / EQ2CLNT210 -> ZOGSDREC has status Undefined (instance DTPR_4EQ97CM4OU8SN3TPQ44G2ZMZX)
    Process Generate Index, variant Generated from LOADING ZPAK_4BFDG83ZVZM4MDUC6L71H1 has status Successfully completed (instance INDX_4EQ97IDIWSIXM0EU3NVNMGOBX)
    Process Activate DataStore Object Data, variant Generated from LOADING ZPAK_4BFDG83ZVZM4MDUC6L71H1 has status Ended with errors (instance ODSA_4EQG4KJGK99HMTOSPBB5WU0BX)
    Job finished
    Here i am giving process types sequence :
    Infopackage -> Create index-> DSO activation.
    does this create index is generating any issues ?
    Regards
    Ravi
    Edited by: BIuser on Aug 10, 2009 1:13 PM
    Edited by: BIuser on Aug 10, 2009 1:13 PM

  • How to call a concurrent program from a Custom JSP page.

    Hi,
    I have a custom JSP page which i have deployed by creating a form function with the path of the JSP Page
    and added the JSP Page to the OA_HTML top.
    Now, i need to call a concurrent program from the JSP Page, i have all the parameters in my page and i am using the standard class as below:
    ConcurrentRequest cr= new ConcurrentRequest(con);
    int requestId= cr.submitRequest("XXINV",programName,null,null,false,vec);
    I have verified my connection object and it is OK but i am getting the exception that user is not set to run the program.
    I tried the below code in my JSP page and getting -1 for all test variables :-
    int userId = wctx.getUserId();
    int respApplId = wctx.getRespApplId();
    int respId = wctx.getRespId();
    I think i need to set the context in JSP page to run the program..
    Pls help ....
    Regards
    Saurabh Jaiswal

    Hi,
    Thanks for the reply,,,
    This is a possible solution but this will allow to run the program anyhow.
    But the procedure which i call thru callable statement will start with
    fnd_global.apps_initialize (3825, 50603, 704);
    fnd_request.submit_request API call.
    Now, the values of user and Responsibilty is required in the program and it changes.
    With this approach we have to hardcode the user and resp.
    The same JSP page is attached to other responsibilities and there the concurrent program would get fired as if fired from the resp Id hardcoded as above.
    Need to capture user Id and RespId.
    How can i set the apps Context in JSP page???
    Regards
    Saurabh Jaiswal

  • Calling one report program from another

    Hi All,
             i am calling one report program from my program & exporting it's output to SAP-SPOOL using SUBMIT statement. I want to fetch the spool no in my program for this spool. Please guide me how this can be achieved? i have tried SYST- SPONO but it's not working.
    Thanks & Regards,
    Chetan.

    Hi,
    Initially check this it might be helpful  to u.
    http://help.sap.com/saphelp_sm40/helpdata/en/30/cc154219fce12ce10000000a1550b0/content.htm.
    Even use the function module slike Job_open , Job_close  this is also one of the methid to achive spool requests.
    Regards,
    Sana.
    Reward with points if found helpful..

  • Calling a Report Program from Web Dynpro

    Hi all,
              I have a requirement, where i have to call a report program from web dynpro?. Wether its possible to call a report program in web dynpro?. Is we can call it, how this functionality has to be achived?

    Hello,
    Yes it is possible to call report using SUBMIT statement from one of the method defined in COMPONENTCONTROLLER's method tab.
    Once you define the method with SUBMIT statement then call that method with proper event.
    Rest configuration will remain same for ABAP webdynpro.
    Hope this helps.
    Thanks,
    Augustin.

  • Can we call a bdc program from report program

    hi
    can we call a bdc program from report program

    Yes you can any program from another program using
    SUBMIT <repname>   statement
    SUBMIT <repname> USING SELECTION-SCREEN dynnr.
    or
    SUBMIT <repname> VIA SELECTION-SCREEN USING SELECTION-SET variant
    SUBMIT <repname> VIA SELECTION-SCREEN WITH SELECTION-TABLE rspar
    etc.
    Regards
    Prax

Maybe you are looking for