Inbound Interface using Idoc

Hi sir,
I am working on an inbound scenario for goods movements from ABC system to SAP thru WPUWBW01 IDOC
I have to do two things:
Step 1: SAP read flat file from ABC sysem & Convert data from flat file into IDOC structure according to the agreed data mapping
Step 2: Process IDOC  to create goods movement.
I have very less idea on inbound scenarios. I know for outbound we used to write code in User exits.
What about inbound one? where to write code.
Please suggest.
Regards
Krishan

Hi!
1. By giving different parameters to the BAPIs. Check out transaction MIGO. You'll see A01 operation is for material income and R01 reference document is for purchase order. These fields can be located in the top left corner.
2. Mostly standards are giving the basic, but you always have to copy it to your needs. Then enter your function module in WE42 transaction to the given process
3. Of course you have to
4. You have to separate them with an IF statement maybe. Don't forget to set statuses for the IDoc and for correct processing, use BAPI_TRANSACTION_COMMIT statement also.
5. Pass
Regards
Tamá

Similar Messages

  • Create a Batch split for inbound delivery using IDOC

    Hi,
    I have an requirement to create Batch splits in the Inbound delivery.
    These Inbound deliveries are created using IDOC.
    So when the inbound deliveries are created through IDOC the Batch split is not happening.
    How can i achieve this through Coding?
    Any pointers on this will be highly appreciated.

    Hi ,
    Try this link.
    http://wiki.sdn.sap.com/wiki/display/ABAP/Toapplybatchsplitinanoutbound+delivery
    Regards
    HM

  • Inbound Interface using HRSM_D01 Idoc

    Hi,
    We have an inbound Idoc using the HRSM_D01 idoc. This interface allows an external system to send data to our SAP HR system to update infotypes 2001 and 2002.
    We are planning on extending this interface by not only allowing new values to enter the system but also cancellations of old records. For example an employee has reported working time for one day but would like to change the record into absence. The employee should then be able to change the record in the source system and the cancellation of the old record (deduction from IT2002) for the attendance and a new record (IT2001) for the absence should be sent to SAP.
    There is a field in the Idoc that indicates if the record should be reversed. But it seems like the RBDAPP01 program that processes the inbound idocs does not update the interface table PTEX2000 with records that have X in the REVERSED field in the idoc.
    Does anyone have experiences from cancelling records in a source system and the passing the cancellation to SAP HR?
    Thank you
    /Björn

    Hi,
    We have an inbound Idoc using the HRSM_D01 idoc. This interface allows an external system to send data to our SAP HR system to update infotypes 2001 and 2002.
    We are planning on extending this interface by not only allowing new values to enter the system but also cancellations of old records. For example an employee has reported working time for one day but would like to change the record into absence. The employee should then be able to change the record in the source system and the cancellation of the old record (deduction from IT2002) for the attendance and a new record (IT2001) for the absence should be sent to SAP.
    There is a field in the Idoc that indicates if the record should be reversed. But it seems like the RBDAPP01 program that processes the inbound idocs does not update the interface table PTEX2000 with records that have X in the REVERSED field in the idoc.
    Does anyone have experiences from cancelling records in a source system and the passing the cancellation to SAP HR?
    Thank you
    /Björn

  • Problem with HU during creation of Inbound Delivery using IDoc

    Hi,
    When I am creating Delivery manually and perform Packing, Handling Unit information is stored in VEKP and VEPO tables.
    But when I am processing through IDoc, after passing data to Handling Unit Segments E1EDL37 (Handling unit header), E1EDL39 (Control Segment for Handling Units), E1EDL44 (IDoc: Handling Unit Item - Delivery), It is creating delivery successfully but Handling Unit information is not getting stored in VEKP, VEPO tables.
    Tried most of the notes 912470, 678464, 682506 and all of them say "<i>You use the Idoc DESADV to create inbound delivery with packing data. The delivery is created, Idoc gets status 52 but the Handling Units (HUs) are missing. This is due to a program error. In case the IDoc contains segments to create HUs (E1EDL37), the IDoc processing should end in error status (51) as long as no packing data could be created</i>.".
    Need your advice whether we have to maintain any customizing for this or how to proceed with it.
    Thanks in advance,
    Murali.

    IDocs and BAPIs sometimes behave differently than transactions. You might need to add a user exit specifically for IDoc processing. Otherwise send a message to SAP and have them look at it.

  • Inbound Interface using RFC

    Hi Experts,
    We are using RFC to get idoc from other sap system.
    Now i have written a code calling bapi for material master . In which user passes the idoc number. Is there any way to automate it . I mean when we get idoc the material master should be created.
    Thanks and Regards
    Neha Kapoor

    Hi Neha,
    In general if all configurations setting have done properly, when ever the idoc has received from the sender based on setting the idoc has to be processed and create the material without manula interaction.
    The following are the basic and mandatory setting :
    -     create the logical system (Identification of system like employee code for a each employee) in both sender and recevier and assign the clients to those logical system: these are the basic setting which already done by some one so no need to care these basic sttings.
    -     Second one is create the RFC destination which in this step we have to give the receiver system details like user id, client number, password etc.. to which the run th F.M module remotely. I think this step is also done be some one .
    -     Third step is you need to be check it out name of the process code for material master and which already they assigned the bapi F.M. this you can be checkit out in WE42
    -     Fourth and more important step is patner profile configuration which contain the sender information along with IDOC and Message type, process code which it will tell the which F.M it needs to be run for IDOC processing.  This can be done by using the WE20- in that u have to identify the patner no, undert that you have to add the entry in ‘Inbound’ area.Press the ‘+’ button symbol it will opens the screen in that you have to give the idoc, message type, process code, and the sender information etc…
    -     And also you have to check out the port information by using the WE21 which it identifyed the medium through which idoc can pass.
    If all these steps are done well you can automatically create the material master whenever the idoc get from sender that is Bapi F.M which you have written code that one triggered automaticallly when all these settings are done properly.
    Hope you will understan some what from above points.
    If you have any doubts please free to send a mail to me or you can reach me at 09886869625.
    Regards,
    vijay

  • OM Interface using IDOC

    Hello,
    We have implemented a distribution model to register changes in some infotypes for object types O, S, C, JF. One of the infotypes to be passed is 1001. It works for all the infotypes and objects, including infotype 1001, but there is a relation  not working, which is the relation between a job family (JF) and position. This relation is 450, and it has additional data. I have seen that some standard segments exists for additional data of some relations, they are named E1PADnnn, where nnn is the relation. As there wasn't any E1PAD450, we created Z1PAD450_01 and added it to our idoc extension. The IDOC is generated now, but it gets erroneous status. We are debugging in the receiving system, and we found out that the system tries to find function module CONVERT_E1PAD450_TO_PAD450, which does not exist (it does exist for some relations)
    I would appreciate if somebody could help with this, because we didn't find any documentation regarding this problem.
    Thank you in advance,
    Elena.

    Hi Elena,
    This seems to be some configuration issue. If I am not wrong the error is happening in receiving system.
    If so check the below step, it would be missing.
    Link Message Type to Function Module T-Code WE57 in receiving system.
    Copy the entry for function module name IDOC_INPUT_HRMD, basic IDoc type HRMD_A06(the idoc type used by you) and message type HRMD_A, and enter ZRMD_A06(the extension created by you) in the field extension type.
    Hope this solves this issue.
    Br/Manas

  • Question about inbound interface

    Hi!
    Here, there is an inbound interface using idocs.
    My question is: if there are five idocs ready to be processed, is the function module executed five times? I mean, one time for each idoc or is there a single function module execution that processes the five idocs?
    Thanks!
    Regards,
    Cristian

    hi,  Cristian
    Actually it depend on IDOC inbound setting for your message type.
    in WE20, go to Partner Profiles:Inbound parameters setting.
    you will be request to set Process Code for Inbound.
    if you choose some Process Code, which support Packet Inbound, you IDOC will be executed Packetize.  E.G. once 5 IDOCs.
    And you inbound function also needed to support Packet.

  • Interface Using BAPI for Uploading shipment datas

    Can any1 send me the example code for Inbound Interface using BAPI for Uploading shipment datas.please kindly send me the programs which u using with BAPI

    Hi
    Except hiring (or new joinee) for all other actions you can use below Function Module.
    HR_INFOTYPE_OPERATION.
    ~~~Ganesh Kumar K.

  • Receiver Business System Connot find Inbound Interface - IDoc to File

    Hi Everyone,
    I am doing IDoc to File Scenario.....Idoc got triggered from SAP system and successfully posted to SAP PI.
    Now when I check in T-Code IDX5 in PI, I got one message. When I double click that I am getting following error:
      <SAP:Category>XIServer</SAP:Category>
      <SAP:Code area="RCVR_DETERMINATION">NO_RECEIVER_CASE_ASYNC</SAP:Code>
      <SAP:P1 />
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:Stack>No receiver could be determined</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    Also When I am selecting Receiving Inbound interface for Receiver system, I am not getting any interface by default.
    Please help me out.
    Thanks & Regards,
    Sudheer

    Hi everyone,
    Thanks for your quick responses.
    Actually I am doing IDoc to File Scenario from blog which consists of Conditional Receiver Determination
    "SNDPFC"
    Here is the Explanation given in that blog:
    In most instances, a new Receiver Determination would be created. However, given that in this scenario the combination of the sender service (i.e. u201CGL1u201D) and interface (i.e. u201CMATMAS.MATMAS04u201D) will be used by every student, each student will instead be adding their receiver service to an existing Receiver Determination
    11. In the Condition column on that same line, left click on the question mark help icon
    12. In the following Condition Editor pop-up window, left click on the help icon in the u201CLeft Operandu201D field
    13. In the following Expression Editor pop-up window, select the u201CContext Objectu201D radio button
    14. Use the drop drown to locate and select the u201CSNDPFCu201D field and u201COKu201D
    15. Back in the Expression Editor, leave the u201C=u201D Operand as is
    16. Enter your group number in the u201CRight Operandu201D and u201COKu201D
    17. u201CSaveu201D and validate your u201CConfigured Receiversu201D as seen below:
    I did not understood this Conditional RD.
    Apart from this all configuration are correct.
    Thanks,
    Sudheer

  • Idoc inbound interface

    Hi experts,
    I am working on inbound interface for MATMAS04. I am using BAPI_MASTER_SAVEDATA to create material.
    Now Can anyone suggest me any inbound function module that returns IDOC number. I am getting data in form of File. EDI_DATA_INCOMING doesnot return idoc number.
    Thanks and regards
    Neha Kapoor

    hi neha,
    Creating a Function Module (Direct Inbound Processing)
    This describes how to create a function module which is identified by the IDoc Interface using a new process code and called from ALE (field TBD52-FUNCNAME). Direct inbound processing using a function module (not using a workflow) always includes the ALE layer. This setting (processing with function module and ALE layer) is identified by the value 6 in the field TEDE2-EDIVRS, which is read by the function module IDOC_START_INBOUND. IDOC_START_INBOUND then calls ALE.
    Example
    FUNCTION IDOC_INPUT_TESTER.
    ""Globale Schnittstelle:
    *" IMPORTING
    *" VALUE(INPUT_METHOD) LIKE BDWFAP_PAR-INPUTMETHD
    *" VALUE(MASS_PROCESSING) LIKE BDWFAP_PAR-MASS_PROC
    *" EXPORTING
    *" VALUE(WORKFLOW_RESULT) LIKE BDWFAP_PAR-RESULT
    *" VALUE(APPLICATION_VARIABLE) LIKE BDWFAP_PAR-APPL_VAR
    *" VALUE(IN_UPDATE_TASK) LIKE BDWFAP_PAR-UPDATETASK
    *" VALUE(CALL_TRANSACTION_DONE) LIKE BDWFAP_PAR-CALLTRANS
    *" TABLES
    *" IDOC_CONTRL STRUCTURE EDIDC OPTIONAL
    *" IDOC_DATA STRUCTURE EDIDD
    *" IDOC_STATUS STRUCTURE BDIDOCSTAT
    *" RETURN_VARIABLES STRUCTURE BDWFRETVAR
    *" SERIALIZATION_INFO STRUCTURE BDI_SER
    initialize SET/GET Parameter and internal tables
    PERFORM INITIALIZE_ORGANIZATIONAL_DATA.
    Move IDOC to internal tables of application
    PERFORM READ_IDOC_TESTER.
    call transaction Order Entry VA01
    PERFORM CALL_VA01_IDOC_ORDERS USING ERRORCODE.
    set status value
    perform write_status_record using errorcode.
    return values of function module
    PERFORM RETURN_VARIABLES_FILL USING ERRORCODE.
    ENDFUNCTION.
    FORM INITIALIZE_ORGANIZATIONAL_DATA.
    initialize SET/GET parameters
    SET PARAMETER ID 'VKO' FIELD SPACE.
    SET PARAMETER ID 'VTW' FIELD SPACE.
    SET PARAMETER ID 'SPA' FIELD SPACE.
    SET PARAMETER ID 'VKB' FIELD SPACE.
    SET PARAMETER ID 'VKG' FIELD SPACE.
    initialize internal tables
    REFRESH BDCDATA.
    CLEAR BDCDATA.
    CLEAR BELEGNUMMER.
    CLEAR ERRTAB.
    REFRESH ERRTAB.
    REFRESH XBDCMSGCOLL.
    CLEAR XBDCMSGCOLL.
    ENDFORM. " INITIALIZE_ORGANIZATIONAL_DATA
    FORM READ_IDOC_TESTER.
    PERFORM INITIALIZE_IDOC.
    LOOP AT IDOC_DATA
    WHERE DOCNUM = IDOC_CONTRL-DOCNUM.
    CASE IDOC_DATA-SEGNAM.
    header data
    WHEN 'E1HEAD'.
    MOVE IDOC_DATA-SDATA TO E1HEAD.
    PERFORM PROCESS_SEGMENT_E1HEAD.
    position data
    WHEN 'E1ITEM'.
    MOVE IDOC_DATA-SDATA TO E1ITEM.
    PERFORM PROCESS_SEGMENT_E1ITEM.
    ENDCASE.
    ENDLOOP.
    only when there were one or more items
    CHECK FIRST NE 'X'.
    APPEND XVBAP. "last one
    ENDFORM. " READ_IDOC_TESTER
    FORM INITIALIZE_IDOC.
    CLEAR XVBAK.
    REFRESH XVBAP.
    CLEAR XVBAP.
    POSNR = 0.
    FIRST = 'X'.
    ENDFORM. " INITIALIZE_IDOC
    FORM PROCESS_SEGMENT_E1HEAD.
    requested date of delivery
    WLDAT = E1HEAD-WLDAT.
    delivery date
    XVBAK-BSTDK = E1HEAD-BSTDK.
    customer number
    XVBAK-KUNNR = E1HEAD-AUGEB.
    order number
    XVBAK-BSTNK = E1HEAD-BELNR.
    division
    XVBAK-SPART = E1HEAD-SPART.
    distribution channel
    XVBAK-VTWEG = E1HEAD-VTWEG.
    sales organization
    XVBAK-VKORG = E1HEAD-VKORG.
    order type
    XVBAK-AUART = E1HEAD-AUART.
    do not fill incoterms (inco1, inco2)
    customer function
    CALL CUSTOMER-FUNCTION '001'
    EXPORTING
    PI_VBAK621 = XVBAK
    IMPORTING
    PE_VBAK621 = XVBAK
    TABLES
    PT_IDOC_DATA_RECORDS = IDOC_DATA.
    ENDFORM. " PROCESS_SEGMENT_E1HEAD
    FORM PROCESS_SEGMENT_E1ITEM.
    position number
    XVBAP-POSNR = XVBAP-POSNR + 1.
    amount
    XVBAP-WMENG = E1ITEM-MENGE.
    unit
    CALL FUNCTION 'ISO_TO_SAP_MEASURE_UNIT_CODE'
    EXPORTING
    ISO_CODE = E1ITEM-BMEINH
    IMPORTING
    SAP_CODE = XVBAP-VRKME
    EXCEPTIONS
    OTHERS = 0.
    material number
    XVBAP-MATNR = E1ITEM-LMATNR.
    CALL CUSTOMER-FUNCTION '002'
    EXPORTING
    PI_VBAP621 = XVBAP
    IMPORTING
    PE_VBAP621 = XVBAP
    TABLES
    PT_IDOC_DATA_RECORDS = IDOC_DATA.
    APPEND XVBAP.
    ENDFORM. " PROCESS_SEGMENT_E1ITEM
    FORM CALL_VA01_IDOC_ORDERS USING ERRORCODE.
    call transaction first dynpro
    PERFORM DYNPRO_START.
    call transaction double-line entry
    PERFORM DYNPRO_DETAIL2.
    incoterms
    PERFORM DYNPRO_HEAD_300.
    call transaction item datas
    PERFORM DYNPRO_POSITION.
    PERFORM DYNPRO_SET USING 'BDC_OKCODE' 'SICH'.
    determine input method
    IF INPUT_METHOD IS INITIAL.
    INPUT_METHOD = 'N'.
    ENDIF.
    call transaction VA01
    CALL TRANSACTION 'VA01' USING BDCDATA
    MODE INPUT_METHOD
    UPDATE 'S'
    MESSAGES INTO XBDCMSGCOLL.
    errorcode = SY-SUBRC. " remember returncode for status update
    ENDFORM. " CALL_VA01_IDOC_ORDERS
    form write_status_record using errorcode.
    FILL IDOC_STATUS
    IDOC_STATUS-DOCNUM = IDOC_CONTRL-DOCNUM.
    IF ERRORCODE = 0.
    IDOC_STATUS-STATUS = BELEG_GEBUCHT. "value 53
    GET PARAMETER ID 'AUN' FIELD BELEGNUMMER.
    IDOC_STATUS-MSGID = 'V1'.
    IDOC_STATUS-MSGNO = '311'.
    IDOC_STATUS-MSGV1 = 'Terminauftrag'.
    IDOC_STATUS-MSGV2 = BELEGNUMMER.
    ELSE.
    IDOC_STATUS-STATUS = BELEG_NICHT_GEBUCHT. "value 51
    IDOC_STATUS-MSGID = SY-MSwGID.
    IDOC_STATUS-MSGNO = SY-MSGNO.
    IDOC_STATUS-MSGV1 = SY-MSGV1.
    IDOC_STATUS-MSGV2 = SY-MSGV2.
    IDOC_STATUS-MSGV3 = SY-MSGV3.
    IDOC_STATUS-MSGV4 = SY-MSGV4.
    ENDIF.
    APPEND IDOC_STATUS.
    ENDFORM.
    FORM DYNPRO_START.
    PERFORM DYNPRO_NEW USING PROGRAMM_AUFTRAG
    DYNPRO-EINSTIEG
    CHANGING LAST_DYNPRO.
    ordertype
    PERFORM DYNPRO_SET USING 'VBAK-AUART' XVBAK-AUART.
    sales organization
    PERFORM DYNPRO_SET USING 'VBAK-VKORG' XVBAK-VKORG.
    Distribution channel
    PERFORM DYNPRO_SET USING 'VBAK-VTWEG' XVBAK-VTWEG.
    Division
    PERFORM DYNPRO_SET USING 'VBAK-SPART' XVBAK-SPART.
    Sales office
    PERFORM DYNPRO_SET USING 'VBAK-VKBUR' XVBAK-VKBUR.
    Sales group
    PERFORM DYNPRO_SET USING 'VBAK-VKGRP' XVBAK-VKGRP.
    ENDFORM. " DYNPRO_START
    FORM DYNPRO_NEW USING PROGNAME
    DYNPRONR
    CHANGING LAST_DYNPRO.
    CLEAR BDCDATA.
    BDCDATA-PROGRAM = PROGNAME.
    BDCDATA-DYNPRO = DYNPRONR.
    BDCDATA-DYNBEGIN = 'X'.
    APPEND BDCDATA.
    LAST_DYNPRO = DYNPRONR.
    ENDFORM. " DYNPRO_NEW
    FORM DYNPRO_SET USING FELDNAME
    FELDINHALT.
    CLEAR BDCDATA.
    CHECK FELDINHALT NE SPACE.
    dynpro field name
    BDCDATA-FNAM = FELDNAME.
    contents
    BDCDATA-FVAL = FELDINHALT.
    APPEND BDCDATA.
    ENDFORM. " DYNPRO_SET
    FORM DYNPRO_DETAIL2.
    okcode
    PERFORM DYNPRO_SET USING 'BDC_OKCODE' PANEL-UER2.
    fix dynpro number 4001
    PERFORM DYNPRO_NEW USING PROGRAMM_AUFTRAG
    '4001'
    CHANGING LAST_DYNPRO.
    order party
    PERFORM DYNPRO_SET USING 'KUAGV-KUNNR' XVBAK-KUNNR.
    purchase order number
    PERFORM DYNPRO_SET USING 'VBKD-BSTKD' XVBAK-BSTNK.
    requested delivery date
    PERFORM DYNPRO_DATE_SET USING 'VBKD-BSTDK' XVBAK-BSTDK.
    purchase order date
    PERFORM DYNPRO_DATE_SET USING 'RV45A-KETDAT' WLDAT.
    ENDFORM. " DYNPRO_DETAIL2
    FORM DYNPRO_DATE_SET USING FELDNAME
    FELDINHALT.
    DATA: DATE TYPE D.
    CLEAR BDCDATA.
    CHECK FELDINHALT NE SPACE.
    BDCDATA-FNAM = FELDNAME.
    WRITE FELDINHALT TO DATE.
    BDCDATA-FVAL = DATE.
    APPEND BDCDATA.
    ENDFORM. " DYNPRO_DATE_SET
    FORM DYNPRO_HEAD_300.
    PERFORM DYNPRO_SET USING 'BDC_OKCODE' PANEL-KKAU.
    incoterms part 1
    IF NOT XVBAK-INCO1 IS INITIAL.
    PERFORM DYNPRO_SET USING 'VBKD-INCO1' XVBAK-INCO1.
    ENDIF.
    incoterms part 2
    IF NOT XVBAK-INCO2 IS INITIAL.
    PERFORM DYNPRO_SET USING 'VBKD-INCO2' XVBAK-INCO2.
    ENDIF.
    PERFORM DYNPRO_SET USING 'BDC_OKCODE' 'BACK'.
    ENDFORM. " DYNPRO_HEAD_300
    FORM DYNPRO_POSITION.
    LOOP AT XVBAP.
    dynpro item double line entry
    PERFORM DYNPRO_SET USING 'BDC_OKCODE' 'UER2'.
    IF XVBAP-POSNR = 1.
    material number
    PERFORM DYNPRO_SET USING 'VBAP-MATNR(01)' XVBAP-MATNR.
    order quantity
    PERFORM DYNPRO_SET USING 'RV45A-KWMENG(01)' XVBAP-WMENG.
    desired delivery date
    PERFORM DYNPRO_DATE_SET USING 'RV45A-ETDAT(1)' WLDAT.
    sales unit
    PERFORM DYNPRO_SET USING 'VBAP-VRKME(1)' XVBAP-VRKME.
    ELSE.
    PERFORM DYNPRO_SET USING 'BDC_OKCODE' 'POAN'.
    material number
    PERFORM DYNPRO_SET USING 'VBAP-MATNR(02)' XVBAP-MATNR.
    order quantity
    PERFORM DYNPRO_SET USING 'RV45A-KWMENG(02)' XVBAP-WMENG.
    desired delivery date
    PERFORM DYNPRO_DATE_SET USING 'RV45A-ETDAT(02)' WLDAT.
    sales unit
    PERFORM DYNPRO_SET USING 'VBAP-VRKME(02)' XVBAP-VRKME.
    ENDIF.
    ENDLOOP.
    ENDFORM. " DYNPRO_POSITION
    FORM RETURN_VARIABLES_FILL USING ERRORCODE.
    allocate IDOC numbers to Workflow output parameters
    IF MASS_PROCESSING <> SPACE.
    IF ERRORCODE = 0.
    RETURN_VARIABLES-WF_PARAM = PID.
    RETURN_VARIABLES-DOC_NUMBER = IDOC_CONTRL-DOCNUM.
    APPEND RETURN_VARIABLES.
    RETURN_VARIABLES-WF_PARAM = APO.
    RETURN_VARIABLES-DOC_NUMBER = BELEGNUMMER.
    APPEND RETURN_VARIABLES.
    WORKFLOW_RESULT = C_WF_RESULT_OK.
    ELSE.
    RETURN_VARIABLES-WF_PARAM = EID.
    RETURN_VARIABLES-DOC_NUMBER = IDOC_CONTRL-DOCNUM.
    APPEND RETURN_VARIABLES.
    WORKFLOW_RESULT = C_WF_RESULT_ERROR.
    ENDIF.
    ELSE.
    IF ERRORCODE = 0.
    RETURN_VARIABLES-WF_PARAM = APE.
    RETURN_VARIABLES-DOC_NUMBER = BELEGNUMMER.
    APPEND RETURN_VARIABLES.
    WORKFLOW_RESULT = C_WF_RESULT_OK.
    ELSE.
    WORKFLOW_RESULT = C_WF_RESULT_ERROR.
    ENDIF.
    ENDIF.
    ENDFORM. " RETURN_VARIABLES_FILL
    Globale Daten von IDOC_INPUT_TESTER
    TABLES: E1HEAD, E1ITEM.
    DATA: BEGIN OF BDCDATA OCCURS 500.
    INCLUDE STRUCTURE BDCDATA.
    DATA: END OF BDCDATA.
    DATA: BEGIN OF XVBAK. "Kopfdaten
    INCLUDE STRUCTURE VBAK621.
    DATA: END OF XVBAK.
    DATA: BEGIN OF XVBAP OCCURS 50. "Position
    INCLUDE STRUCTURE VBAP.
    DATA: WMENG(18) TYPE C.
    DATA: LFDAT LIKE VBAP-ABDAT.
    DATA: KSCHL LIKE KOMV-KSCHL.
    DATA: KBTRG(16) TYPE C.
    DATA: KSCHL_NETWR LIKE KOMV-KSCHL.
    DATA: KBTRG_NETWR(16) TYPE C.
    DATA: INCO1 LIKE VBKD-INCO1.
    DATA: INCO2 LIKE VBKD-INCO2.
    DATA: YANTLF(1) TYPE C.
    DATA: PRSDT LIKE VBKD-PRSDT.
    DATA: HPRSFD LIKE TVAP-PRSFD.
    DATA: END OF XVBAP.
    DATA: BEGIN OF DYNPRO,
    EINSTIEG LIKE T185V-DYNNR VALUE 101,
    KKAU LIKE T185V-DYNNR,
    UER2 LIKE T185V-DYNNR,
    KBES LIKE T185V-DYNNR,
    ERF1 LIKE T185V-DYNNR,
    PBES LIKE T185V-DYNNR,
    PKAU LIKE T185V-DYNNR,
    PEIN LIKE T185V-DYNNR,
    EID1 LIKE T185V-DYNNR,
    POPO LIKE T185V-DYNNR,
    EIPO LIKE T185V-DYNNR,
    KPAR LIKE T185V-DYNNR,
    PSDE LIKE T185V-DYNNR,
    PPAR LIKE T185V-DYNNR,
    KDE1 LIKE T185V-DYNNR,
    KDE2 LIKE T185V-DYNNR,
    PDE1 LIKE T185V-DYNNR,
    PDE2 LIKE T185V-DYNNR,
    PKON LIKE T185V-DYNNR,
    END OF DYNPRO.
    DATA: BEGIN OF PANEL,
    KKAU LIKE T185V-PANEL VALUE 'KKAU',
    UER2 LIKE T185V-PANEL VALUE 'UER2',
    KBES LIKE T185V-PANEL VALUE 'KBES',
    ERF1 LIKE T185V-PANEL VALUE 'ERF1',
    PBES LIKE T185V-PANEL VALUE 'PBES',
    PKAU LIKE T185V-PANEL VALUE 'PKAU',
    PEIN LIKE T185V-PANEL VALUE 'PEIN',
    EID1 LIKE T185V-PANEL VALUE 'EID1',
    EIAN LIKE T185V-PANEL VALUE 'EIAN',
    POPO LIKE T185V-PANEL VALUE 'POPO',
    EIPO LIKE T185V-PANEL VALUE 'EIPO',
    KPAR LIKE T185V-PANEL VALUE 'KPAR',
    PSDE LIKE T185V-PANEL VALUE 'PSDE',
    POAN LIKE T185V-PANEL VALUE 'POAN',
    PPAR LIKE T185V-PANEL VALUE 'PPAR',
    KDE1 LIKE T185V-PANEL VALUE 'KDE1',
    KDE2 LIKE T185V-PANEL VALUE 'KDE2',
    PDE1 LIKE T185V-PANEL VALUE 'PDE1',
    PDE2 LIKE T185V-PANEL VALUE 'PDE2',
    PKON LIKE T185V-PANEL VALUE 'PKON',
    KOAN LIKE T185V-PANEL VALUE 'KOAN',
    END OF PANEL.
    DATA: BEGIN OF ERRTAB OCCURS 20,
    TRANS LIKE TSTC-TCODE,
    ARBGB LIKE T100-ARBGB,
    CLASS(1) TYPE C,
    MSGNR LIKE T100-MSGNR,
    TEXT LIKE T100-TEXT,
    TEXT(123) TYPE C,
    MSGV1 LIKE SY-MSGV1,
    MSGV2 LIKE SY-MSGV2,
    MSGV3 LIKE SY-MSGV3,
    MSGV4 LIKE SY-MSGV4,
    END OF ERRTAB.
    *---- Hilfsfelder -
    DATA: PROGRAMM_AUFTRAG LIKE T185V-AGIDV VALUE 'SAPMV45A'.
    DATA: LAST_DYNPRO LIKE T185V-DYNNR,
    WLDAT LIKE VBAK-BSTDK,
    POSNR LIKE VBAP-POSNR,
    FIRST(1) TYPE C VALUE 'X'.
    DATA: BEGIN OF XBDCMSGCOLL OCCURS 10.
    INCLUDE STRUCTURE BDCMSGCOLL.
    DATA: END OF XBDCMSGCOLL.
    Terminauftrag ( Auftragsart wird fest gesetzt !)
    DATA: BELEGNUMMER LIKE VBAK-VBELN.
    DATA: ERRORCODE LIKE SY-SUBRC.
    Statuswerte fuer IDOC-Status
    DATA: BELEG_NICHT_GEBUCHT LIKE TEDS1-STATUS VALUE '51'.
    DATA: BELEG_GEBUCHT LIKE TEDS1-STATUS VALUE '53'.
    *- Direktwerte für Return_variables -
    data:
    eid like bdwfretvar-wf_param value 'Error_IDOCs',
    pid like bdwfretvar-wf_param value 'Processed_IDOCs',
    apo like bdwfretvar-wf_param value 'Appl_Objects',
    ape like bdwfretvar-wf_param value 'Appl_Object'.
    *- Direktwerte für Workflow_Result -
    DATA: C_WF_RESULT_ERROR LIKE BDWFAP_PAR-RESULT VALUE '99999'.
    DATA: C_WF_RESULT_OK LIKE BDWFAP_PAR-RESULT VALUE '0'.
    http://help.sap.com/saphelp_nw04/helpdata/en/dc/6b7df143d711d1893e0000e8323c4f/frameset.htmhttp://help.sap.com/saphelp_nw04/helpdata/en/dc/6b7df143d711d1893e0000e8323c4f/frameset.htmhttp://help.sap.com/saphelp_nw04/helpdata/en/dc/6b7df143d711d1893e0000e8323c4f/frameset.htmhttp://help.sap.com/saphelp_nw04/helpdata/en/dc/6b7df143d711d1893e0000e8323c4f
    Plz Reward points if helpfull   ...
    Regards,
    Mandeep.

  • Multiple inbound interfaces (xml) but one target (idoc)

    Hi Experts,
    I am trying to setup in ID four inbound interfaces (eg. MessageType1-MesageType4) and each has an interface mapping having the same target idoc (eg. Shpmnt05).
    Also, there is a condition set per interface mapping. 
    Should I create four sender agreements that is one per message type? If so, how many interface determination is needed? Any advise please.
    IR
    Message Interfaces:
    OA_MessageType1
    OA_MessageType2
    OA_MessageType3
    OA_MessageType4
    Interface Mappings:
    OA_MessageType1_to_Shpmnt05
    OA_MessageType2_to_Shpmnt05
    OA_MessageType3_to_Shpmnt05
    OA_MessageType4_to_Shpmnt05
    ID
    Receiver Determination:
    |Party1|Shpmnt05
    Interface Determination:
    Sender Agreement:

    However, how are we going to handle the interface determination?  I believe in the interface determination setup it asks for the message interface suppose MessageType1.
    Now, I need to set-up the condition (eg. operationtype=Create)  for that message interface and set interface mapping.  For this one the interface mapping to be used is OA_MessageType1_to_Shpmnt05. 
    But in this case, i need to add another condition (eg. operationtype=dummy) so that the first condition will be saved, correct? I think if I only have one condition in the interface determination, once activated the condition is gone.
    Having said, are you suggesting that i need four interface determinations?
    Or is it possible to just have one int. det.?

  • How to connect to third party using PI for outbound and inbound interfaces

    Hello,
    I have scenarios where I have data coming in from third party EDI subsystem and sent to SAP. And also from SAP to EDI subsystem. We need to send the XMLs to the EDI subsystema nd also receive XMLs.
    Can someone please suggest the ways I can connect to EDI subsytem for both Outbound and Inbound interfaces.
    Thanks

    Hi Prabhu,
    EDI file is different from the normal flat or xml file. Hope you understand the difference.
    Now if your EDI subsytem has the capability of converting the xml file to edi file viceversa then create and receive the xml file from the EDI subsystem. For the xml file you may use the file adapter as an option.
    If it doesnot have the capability then seeburger adapter needs to  be used. This is not an inbuilt adapter. So your company needs to purchase it.
    Regards,
    ---Satish

  • Data transfer b/w SAP to Java using IDOC and Interface SAP Jco

    Dear Experts,
    The challenging requirement we are having is, we need to create the interface for data transfer between SAP system and the Java system. The data will be transferred from SAP to java and similarly once some processing done in Java again the details needs to be transferred from Java to SAP.
    For this data transferred we are planning to use IDOC process and for interface "SAP Java connector (Version 3.0.5)" we are planning to use. As per our understanding, from Java side one program needs to be written to connect with SAP as "Registered program". This registered program will appear in SAP GATEWAY automatically and using tRFC, TCP/IP connection both SAP and Java system will be connected.
    In this case we are having some doubts.
    1. The data from SAP is going to be transfered from one Custom transaction (Z tcode). Once "Outbound IDOC" will get triggered and will carry the details. Now the doubt is, whether the data / details will get transfered to JAVA system automatically or we need to perform any other steps from SAP ABAP coding...(like converting in to flat file, XML file and etc) ??
    2. We are planning to install "SAP Jco" in Java server. Is this correct...??
    3. Other than SAP Jco any other softwares needs to be installed or not..??
    4. Since we are going to trigger the "outbound IDOC" from custom transaction, we are planning to develope one program in SE37. Other than this any other program we need to develop or not..??
    5. Any sample Java program for the SAP Jco version 3.0.5 to create the "Registered program" with SAP..? (e.g. SAP Listener program).?
    If anybody has detailed steps or explanation please share it with us.
    Thanks in advance
    Warm Regards,
    VEL

    Hi All,
      For the above mentioned issue, we implemented JCo software in JAVA system and created the JAVA program including SAP logon credential details like Client, User name, password and Language details.
    When this JAVA program was compiled successfully then, that non SAP system will appear in SAP gateway Tcode.
    Once non SAP system started appearing in SAP gateway that means, both SAP & Non SAP are connected automatically.
    Regards,
    Velmurugan P

  • PO Creation Using IDOC ORDERS05 - Inbound Issue

    Hi Experts,
    I am new to the ALE/IDOCs. I am trying to create a PO in one client and trasnferring it to another client using the IDOC extension. I am using Message type ORDERS and Basic type ORDERS05 (Extended). I have craeted Partner Profile for both Inbound and outbound in their respective clients.From Outbond the Purchase order is sent successfully to the Port. On the inbound the PO is failing due to incorrect function mudule chosen for processing through process code. I have tried process codes like ORDE,ORDS,DELO and ME11.
    Please Let me know the corrects process code in the inbound, to process IDOC as PO.
    If i need to go for all together a different mesasge type. Please give me all the relevant details like BASIC type, Process code in Inbound and outbound . And i want the BASIC type to be extensible.
    Thanks,
    Murali

    Hi,
    In the inbound side create a new entry in WE57 tcode.. with the functio mdoule as "IDOC_INPUT_ORDERS", basic type "ORDERS05", extn< specify the extn u created at outbound side>, message type "ORDERS". Now see if it is working.
    Regards,
    Nagaraj

  • How to create Inbound Delivery using SHPMNT03 Idoc details...

    Hi,
         I need to create <b><b>Inbound delivery</b> using idoc SHPMNT03</b> details. I am getting all the data required to create Inbound delivery is from this idoc. for that I need to create a custom function module.
    I tried with FM  IDOC_INPUT_DESADV1. But it is for only if you use DELVRY03.
    I haven't (yet) found a way to create automatically an inbound delivery when you post the goods issue from the outbound delivery.
    Does anyone experienced the use of inbound deliveries with STO and what are your recommendation?
    Thanks a lot,
    Ranjith.

    Hi there,
    Please have a look at the following link.
    http://help.sap.com/erp2005_ehp_04/helpdata/EN/dc/6b828943d711d1893e0000e8323c4f/frameset.htm
    Hope this helps,
    Kind Regards,
    Matthew

Maybe you are looking for

  • Mail is not working properly (cannot replay), and skype cannot be answered

    Did the verification, repair and installation disk of Mac. Why mail is not working properly (cannot replay), and skype cannot be answered?

  • Urgent: Oracle 8i & Developer 6.0

    Is it possible for Developer 6.0 (Forms and Reports) to access Oracle 8i database? (I have installed Oracle 8i in D drive and Developer 6.0 in E drive. Operating system is Windows NT). If yes, how do I make the connection? The tnsnames.ora has to be

  • Customer exit in APO for current month in query

    Hi, I need to create a customer exit which automatically restricts 0calmonth on the current month in a query. How should I do this APO? Most important, Which table should I use to find the input, i.e current month and year? If possible please provide

  • Formating between 10.1.3.3.2 and 5.6.2

    Is it possible to import documents between 10.1.3.3.2 and 5.6.2 and retain formatting? HTML documents are wider in 10.1.3.3.2 than they are in 5.6.2, so documents designed in 5.6.2 are too wide for 10.1.3.3.2 Any advise on this would be much apprecia

  • Lightroom 5 Stand Alone????

    I recently started using LR 5 as a Trial, and I now wish to buy it. I cannot find any way to do that.   I can only find a link to buy LR 6, or to buy the full CC - which I do not need. How can I get that Trail of LR 5 operable again by buying it?