Populate AWKEY in IDOC posting

I wanted to populate AWKEY when I use IDOC_INPUT_ACC_DOCUMENT fm as what we have in FB01.
I tried doing this in fm but still cannot. The number has been skip by 1 each time 'RF_GET_DOCUMENT_NUMBER'. The transaction code in my IDOC is RFBU.
How should I modify the program so that my IDOC's reference key (AWKEY) will populate BELNR + BUKRS + GJAHR?

just figured out that as long as I don't fill in OBJ_KEY, OBJ_SYS and OBJ_TYPE, this field will get automatically populated.

Similar Messages

  • Issue in Idoc Posting

    Hi Guru's,
    I am facing an issue during the consumption values upload in forecasting view thru LSMW (BAPI) with Idoc, issue is that at the end of the upload i am getting status of Idoc posting is 53 which is Application Document Posted, but i found some of the the materials for which consumption values were not uploaded but Idoc posting status is showing 53 and getting massage:Material number XYZ1234 in version  already exists.
    Kindly give ur expert opinion on the above mentioned issue.
    With Regards.

    A little clarification might help you...  explain 'BOX'.  Do you mean an SAP Instance?  SAP Instance/Client?  Or ??

  • Starting new database LUW inside ABAP during IDoc posting

    Hi all,
    During posting of an inbound IDoc, I am trying to update my Z-table in user-exit. I want to do it regardless of the result of IDoc posting. The problem is: if IDoc posted successfully - table is updated because COMMIT WORK is called at the end of the posting, however, if IDoc not posted - ROLLBACK WORK is called and table is not updated. So, my aim now is to commit the update of Z-table in any case, but it is the only thing that should be committed - no other prior update FMu2019s should be committed.
    I'm aware about the following thread
    http://forums.sdn.sap.com/thread.jspa?threadID=1884700
    Author of this thread says that he solved a problem by means of RFC and STARTING NEW TASK. But ABAP help says
    that starting asynchronous RFC triggers immediately a database commit in the calling program (which is unacceptable because all prior update FMu2019s will be committed ). I've checked and it is really the case.
    From my point of view SET UPDATE TASK LOCAL with COMMIT WORK should work in such kind of tasks, but in case of IDoc processing the whole process runs in a local update (see SET UPDATE TASK LOCAL in FM 'IDOC_INPUT'), so writing once again SET UPDATE TASK LOCAL has no effect.
    I tested SUBMIT statement as well. It had no effect and then I found out from ABAP help that SUBMIT ... AND RETURN starts new SAP LUW, but NOT a DB LUW. That is if I update my Z-table in the program called by SUBMIT - all ROLLBACK statements still affect my  Z-table update.
    Is there any simple solution? Please suggest.
    Thanks in advance!

    Hello,
    Try SUBMIT VIA JOB.....
    Sample Code
    call function 'JOB_OPEN'
    exporting
    jobname = name
    importing
    jobcount = number
    exceptions
    cant_create_job = 1
    invalid_job_data = 2
    jobname_missing = 3
    others = 4.
    if sy-subrc = 0.
    submit z_idoc_create_process_order and return
    via job name number number
    with p_aufnr = it_header1-aufnr
    with p_werks = it_header1-werks
    with p_autyp = c_autyp
    with p_auart = it_header1-auart
    with p_dispo = it_header1-dispo
    with p_opt = c_opt
    with p_mestyp = c_mestyp.
    if sy-subrc = 0.
    call function 'JOB_CLOSE'
    exporting
    jobcount = number
    jobname = name
    strtimmed = 'X'
    exceptions
    cant_start_immediate = 1
    invalid_startdate = 2
    jobname_missing = 3
    job_close_failed = 4
    job_nosteps = 5
    job_notex = 6
    lock_failed = 7
    others = 8.
    if sy-subrc 0.
    endif.

  • Delay in the Inbound Idoc Posting Process

    Dear Friends,
    We have an scenario in the Inbound Idoc Posting Process, when we process the Idocs through the standard Inbound Program - RBDAPP01, we face the delay of 3hrs to 12 hrs, approx.
    When we try to re-process the same through the manual process, we could successfully post the Idocs, immediately.
    When the same happens, through the background job - the delay is happening.
    As we see, there is no problem with the program - RBDAPP01, but can't able to trace the delay in the process.
    Any suggestions / advises are welcome.
    Thanks in advance.

    Hi Prasanna,
    The update will happen only if a value already exists with the same unit of measure in the system. If the quantity is left blank in the system and if you are trying to update, the update might not happen. Even if the value is Zero in the system, provide the same unit of measure as the data used in the BAPI.
    Regards,
    Yogesh

  • Inbound IDOC Posting

    I am developing a function module in ECC that will be used to post inbound IDOC for customer creation DEBMAS07
    The logic is as follows -
    The function receives an IDOC structure
    It then invokes function module 'IDOC_INPUT_DEBITOR'
    IDOC_INPUT_DEBITOR takes care of creating a new customer in table KNA1. But I was expecting IDOC_INPUT_DEBITOR to also handle the IDOC posting. This way I can go to WE02 and see a new IDOC record. What am I missing? Is there some more code I need to write after the function module call?
    Thank you.
    * IDOC structures for using ALE
         data       lc_no_display         type bdwfap_par-inputmethd value ' '.
         data       lt_idoc_control       type standard table of edidc.
         data       ls_idoc_control       type edidc.
         data       lt_idoc_data          type standard table of edidd.
         data       lt_idoc_data_knvi     type standard table of edidd.
         data       lt_idoc_status        type standard table of bdidocstat.
         data       ls_idoc_status        type bdidocstat.
         data       lt_return_variables   type standard table of bdwfretvar.
         data       lt_serialization_info type standard table of bdi_ser.
         data       lv_workflow_result    type bdwf_param-result.
         data       pi_idoctyp            type edi_iapi00-idoctyp.
         data       pt_segments           type standard table of edi_iapi11.
         data       lw_segments           type edi_iapi11.
         data       ls_idoc_data          type edidd.
         data       ls_e1kna1m            type  zdebmas07_e1kna1m.
         data       e1kna1m               type e1kna1m.
    *** CONTROL DATA
         ls_idoc_control-mandt  = input-idoc-edi_dc40-mandt.
         ls_idoc_control-status = input-idoc-edi_dc40-status.
         ls_idoc_control-doctyp = input-idoc-edi_dc40-idoctyp.
         ls_idoc_control-direct = input-idoc-edi_dc40-outmod.
         ls_idoc_control-rcvprt = input-idoc-edi_dc40-rcvprt.
         ls_idoc_control-rcvprn = input-idoc-edi_dc40-rcvprn.
         ls_idoc_control-stdmes = input-idoc-edi_dc40-stdmes.
         ls_idoc_control-outmod = input-idoc-edi_dc40-outmod.
         ls_idoc_control-sndpor = input-idoc-edi_dc40-sndpor.
         ls_idoc_control-sndprt = input-idoc-edi_dc40-sndprt.
         ls_idoc_control-sndprn = input-idoc-edi_dc40-sndprn.
         ls_idoc_control-mestyp = input-idoc-edi_dc40-mestyp.
         ls_idoc_control-idoctp = input-idoc-edi_dc40-idoctyp.
         append ls_idoc_control to lt_idoc_control.
    *** READ SEGMENTS
         pi_idoctyp = ls_idoc_control-idoctp.
         call function 'IDOCTYPE_READ_COMPLETE'
           exporting
             pi_idoctyp         = pi_idoctyp
           tables
             pt_segments        = pt_segments
           exceptions
             object_unknown     = 1
             segment_unknown    = 2
             relation_not_found = 3
             others             = 4.
         loop at pt_segments into lw_segments.
           case lw_segments-segmenttyp.
             when 'E1KNA1M'.
               ls_idoc_data-segnam = 'E1KNA1M'.
               ls_idoc_data-mandt  = sy-mandt.
               ls_idoc_data-segnum = lw_segments-nr.
               ls_idoc_data-psgnum = lw_segments-parpno.
               ls_e1kna1m          = input-idoc-e1kna1m.
               move-corresponding ls_e1kna1m to e1kna1m.
               move e1kna1m to ls_idoc_data-sdata.
               append ls_idoc_data to lt_idoc_data.
               exit.
           endcase.
         endloop.
    *** IDOC INPUT CALL FUNCTION
         data: response type zsi_create_customer_is_res_tab.
         data: response_lwa type zsi_create_customer_is_respons.
         data: lwa_error_message type string.
         call function 'IDOC_INPUT_DEBITOR'
           exporting
             input_method          = lc_no_display
             mass_processing       = space
           importing
             workflow_result       = lv_workflow_result
           tables
             idoc_contrl           = lt_idoc_control
             idoc_data             = lt_idoc_data
             idoc_status           = lt_idoc_status
             return_variables      = lt_return_variables
             serialization_info    = lt_serialization_info
           exceptions
             wrong_function_called = 1
    others                = 2.

    Hello Megan,
    Check with the function modules
    EDI_DATA_INCOMING
    IDOC_WRITE_AND_START_INBOUND
    Program:
    RBDAPP01
    I guess this would answer your query.
    Regards,
    TP

  • Processes in Inbound IDoc posting

    Hi guys,
    I'm new with IDocs, and I have an object which requires Inbound IDoc posting..
    Can you give me the possible steps/processes including the tcodes on how can I solve this object?
    Please also include FMs that I might possibly used during my development.
    I highly appreciate all your swift responses. Thanks!

    Hi Mel,
    You can use FM IDOC_INBOUND_WRITE_TO_DB to create an inbound IDoc.
    CALL FUNCTION 'IDOC_INBOUND_WRITE_TO_DB'
        EXPORTING
          PI_STATUS_MESSAGE       = I_EDIDS
        IMPORTING
          PE_IDOC_NUMBER          = DOCNUM
          PE_STATE_OF_PROCESSING  = STPROC
          PE_INBOUND_PROCESS_DATA = I_TEDE2
        TABLES
          T_DATA_RECORDS          = I_EDIDD
        CHANGING
          PC_CONTROL_RECORD       = I_EDIDC
        EXCEPTIONS
          IDOC_NOT_SAVED          = 1
          OTHERS                  = 2.
    Regards,
    Chandra Sekhar

  • /SAPTRX/IDOC_INPUT_EVMSTA IDoc posting only works for single BAPI call

    Although the settings and code imply that the function /SAPTRX/IDOC_INPUT_EVMSTA can handle multiple events in a single IDoc the fact is that the code does not have a refresh statement on the BAPI internal tables with the loop through the IDoc control record. This means that we end up posting multiple events for the the same event during Idoc posting.
    Is SAP going to fix this situation? PS: The same applies with the EHPOST Idoc function module.
    Thank you
    Kevin

    Dear,
    I just debugged my Z-function, after adding all input parameters as in the standard BAPI function.
    All parameters seems to be passed correctly except from the table parameters from
    CLASS_OBJECTS
    So all I_parameters are passed :
    {ZBAPI_CLASS_GET_CLASSIFICATION.I_LANGU_INT} = "EN" and
    {ZBAPI_CLASS_GET_CLASSIFICATION.I_LANGU_ISO} = "EN" and
    {ZBAPI_CLASS_GET_CLASSIFICATION.I_KEY_DATE} = Date (2011, 08, 05) and
    {ZBAPI_CLASS_GET_CLASSIFICATION.I_CLASSNUM} = "DSWTEST" and
    {ZBAPI_CLASS_GET_CLASSIFICATION.I_CLASSTYPE} = "001" and
    {ZBAPI_CLASS_GET_CLASSIFICATION.I_CHARACTS_OF_CLASS_ONLY.BAPIFLAG} = ""
    but the table parameters aren't coming through:
    {ZBAPI_CLASS_GET_CLASSIFICATION.T_CLASS_OBJECTS.OBJECT_TYPE} = "MARA" and
    {ZBAPI_CLASS_GET_CLASSIFICATION.T_CLASS_OBJECTS.OBJECT_KEY} = "000000000000000085" and
    these are 'blanco' in the function.
    also after the function is executed and all data is retrieved, when passing the data back to Crystal reports, once again, the table result isn't passed to Crystal Reports.
    please advise

  • IDOC Posting problem Through Billing Output Type

    Dear Friends,
    I have strange problem for IDOC posting through Billing Output Type.
    We are using same output type for Partial / Final settlements through Billing Output type.
    For Final settlements IDOC posted and generated account document is perfect, But for Partial settlement we are always getting message data is missing "No batch input data for screen SAPMF05A 0700 (Message no. 00 344)".
    I tried to reprocess same IDOC in foreground then we are getting message "Posting is only possible with a zero balance; correct document"
    (Message no. F5 060).
    Could you please suggest me
    Thanx  in Advance.

    solved

  • Inbound IDoc Posting Function Module

    Give me an example of   how to write "Inbound IDoc Posting Function Module".
    In my IDOC i have 10 segments each containing 1 field.
    How do i create the Inbound IDoc Posting Function Module ??
    Is the following code correct ??
    FUNCTION ZIDOC_INBOUND.
    ""Local interface:
    *"  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
    *"      IDOC_DATA STRUCTURE  EDIDD
    *"      IDOC_STATUS STRUCTURE  BDIDOCSTAT
    *"      RETURN_VARIABLES STRUCTURE  BDWFRETVAR
    *"      SERIALIZATION_INFO STRUCTURE  BDI_SER
    *"  EXCEPTIONS
    *"      WRONG_FUNCTION_CALLED
    *DATABASE TABLES
    TABLES:LIKPUK.
    *DATA DECLARATIONS
        DATA: SALES_ORDER_NUM             LIKE Z1VBELN.
        DATA: DEL_TYPE                    LIKE Z1LFART.
        DATA: ACTUAL_GOODS_MOVEMENT_DATE  LIKE Z1WADAT_IST.
        DATA: SHIPPING_POINT              LIKE Z1VSTEL.
        DATA: LOADING_POINT               LIKE Z1LSTEL.
        DATA: ROUTE_PGI                   LIKE Z1ROUTE.
        DATA: PICK_DATA                   LIKE Z1KODAT.
        DATA: CUST_NO                     LIKE Z1KUNNR.
        DATA: LOCAL_DATE                  LIKE Z1STDAT.
        DATA: TOTAL_GOOD_MOV              LIKE Z1WBSTK.
    *INTERNAL TABLE DECLARATION
    DATA:
    IT_LIKP LIKE LIKPUK OCCURS 0 WITH HEADER LINE.
    INITIALIZE WORK FLOW
        WORK_RESULT = C_WF_RESULT_OK.
         LOOP AT IDOC_CONTRL.
    MAKE SURE WE HAVE CORRECT MESSAGE TYPE PASSED.
         IF IDOC_CONTRL-MESTYP NE 'Z_IDOC_PGI'.
         RAISE WRONG_FUNCTION_CALLED.
         ENDIF.
    CLEAR APPLICATION BUFFERS BEFORE READING NEW ENTRY
        CLEAR :IT_LIKP.
      REFRESH IT_LIKP.
    *PROCESS ALL THE DATA RECORDS IN AN IDOC AND TRANSFER THEM TO
    *APPLICATION BUFFERS
    INCLUDE MBDCONWF.
    LOOP AT IDOC_DATA WHERE DOCNUM EQ idoc_contrl-docnum.
    CASE IDOC_DATA-SEGNAM.
    WHEN'Z1VBELN'.
       SALES_ORDER_NUM  =    IDOC_DATA-SDATA.
       MOVE-CORRESPONDING SALES_ORDER_NUM TO IT_LIKP.
    WHEN 'Z1LFART'.
       DEL_TYPE    = IDOC_DATA-SDATA.
       MOVE-CORRESPONDING DEL_TYPE TO IT_LIKP.
    WHEN 'Z1WADAT_IST'.
       ACTUAL_GOODS_MOVEMENT_DATE    = IDOC_DATA-SDATA.
       MOVE-CORRESPONDING ACTUAL_GOODS_MOVEMENT_DATE TO IT_LIKP.
    WHEN 'Z1VSTEL'.
       SHIPPING_POINT    = IDOC_DATA-SDATA.
       MOVE-CORRESPONDING SHIPPING_POINT TO IT_LIKP.
    WHEN 'Z1LSTEL'.
       LOADING_POINT   = IDOC_DATA-SDATA.
       MOVE-CORRESPONDING LOADING_POINT TO IT_LIKP.
    WHEN 'Z1ROUTE'.
       ROUTE_PGI    = IDOC_DATA-SDATA.
       MOVE-CORRESPONDING ROUTE_PGI TO IT_LIKP.
    WHEN 'Z1KODAT'.
       PICK_DATA =   IDOC_DATA-SDATA.
       MOVE-CORRESPONDING PICK_DATA TO IT_LIKP.
    WHEN'Z1KUNNR'.
       CUST_NO  =   IDOC_DATA-SDATA.
       MOVE-CORRESPONDING CUST_NO TO IT_LIKP.
    WHEN'Z1STDAT'.
       LOCAL_DATE  =   IDOC_DATA-SDATA.
       MOVE-CORRESPONDING LOCAL_DATE TO IT_LIKP.
    WHEN'Z1WBSTK'.
       TOTAL_GOOD_MOV  =   IDOC_DATA-SDATA.
       MOVE-CORRESPONDING TOTAL_GOOD_MOV TO IT_LIKP.
    ENDCASE.
    ENDLOOP.
    selecting data from the database
    select * from likp into corresponding fields of table it_likp.
    add status record
        IF SY-SUBRC EQ 0.
          IDOC_STATUS-DOCNUM = IDOC_CONTRL-DOCNUM.
          IDOC_STATUS-STATUS = '53'.
          IDOC_STATUS-MSGTY = 'I'.
          IDOC_STATUS-MSGID = 'YM'.
          IDOC_STATUS-MSGNO = '004'.
          IDOC_STATUS-MSGV1 = it_likp-VBELN.
          APPEND IDOC_STATUS.
          CLEAR IDOC_STATUS.
        ELSE.
          IDOC_STATUS-DOCNUM = IDOC_CONTRL-DOCNUM.
          IDOC_STATUS-STATUS = '51'.
          IDOC_STATUS-MSGTY = 'E'.
          IDOC_STATUS-MSGID = 'YM'.
          IDOC_STATUS-MSGNO = '005'.
          IDOC_STATUS-MSGV1 = it_likp-VBELN.
          APPEND IDOC_STATUS.
          CLEAR IDOC_STATUS.
          WORKFLOW_RESULT = C_WF_RESULT_ERROR.
          RETURN_VARIABLES-WF_PARAM = 'Error_Idocs'.
          RETURN_VARIABLES-DOC_NUMBER = IDOC_CONTRL-DOCNUM.
          APPEND RETURN_VARIABLES.
          CLEAR RETURN_VARIABLES.
        ENDIF.
    IF SY-SUBRC EQ 0.
          IDOC_STATUS-DOCNUM = IDOC_CONTRL-DOCNUM.
          IDOC_STATUS-STATUS = '53'.
          IDOC_STATUS-MSGTY = 'I'.
          IDOC_STATUS-MSGID = 'YM'.
          IDOC_STATUS-MSGNO = '004'.
          IDOC_STATUS-MSGV1 = IT_LIKP-LFART.
          APPEND IDOC_STATUS.
          CLEAR IDOC_STATUS.
        ELSE.
          IDOC_STATUS-DOCNUM = IDOC_CONTRL-DOCNUM.
          IDOC_STATUS-STATUS = '51'.
          IDOC_STATUS-MSGTY = 'E'.
          IDOC_STATUS-MSGID = 'YM'.
          IDOC_STATUS-MSGNO = '005'.
          IDOC_STATUS-MSGV1 = IT_LIKP-LFART.
          APPEND IDOC_STATUS.
          CLEAR IDOC_STATUS.
          WORKFLOW_RESULT = C_WF_RESULT_ERROR.
          RETURN_VARIABLES-WF_PARAM = 'Error_Idocs'.
          RETURN_VARIABLES-DOC_NUMBER = IDOC_CONTRL-DOCNUM.
          APPEND RETURN_VARIABLES.
          CLEAR RETURN_VARIABLES.
        ENDIF.
    IF SY-SUBRC EQ 0.
          IDOC_STATUS-DOCNUM = IDOC_CONTRL-DOCNUM.
          IDOC_STATUS-STATUS = '53'.
          IDOC_STATUS-MSGTY = 'I'.
          IDOC_STATUS-MSGID = 'YM'.
          IDOC_STATUS-MSGNO = '004'.
          IDOC_STATUS-MSGV1 = IT_LIKP-WADAT_IST.
          APPEND IDOC_STATUS.
          CLEAR IDOC_STATUS.
        ELSE.
          IDOC_STATUS-DOCNUM = IDOC_CONTRL-DOCNUM.
          IDOC_STATUS-STATUS = '51'.
          IDOC_STATUS-MSGTY = 'E'.
          IDOC_STATUS-MSGID = 'YM'.
          IDOC_STATUS-MSGNO = '005'.
          IDOC_STATUS-MSGV1 = IT_LIKP-WADAT_IST.
          APPEND IDOC_STATUS.
          CLEAR IDOC_STATUS.
          WORKFLOW_RESULT = C_WF_RESULT_ERROR.
          RETURN_VARIABLES-WF_PARAM = 'Error_Idocs'.
          RETURN_VARIABLES-DOC_NUMBER = IDOC_CONTRL-DOCNUM.
          APPEND RETURN_VARIABLES.
          CLEAR RETURN_VARIABLES.
        ENDIF.
        IF SY-SUBRC EQ 0.
          IDOC_STATUS-DOCNUM = IDOC_CONTRL-DOCNUM.
          IDOC_STATUS-STATUS = '53'.
          IDOC_STATUS-MSGTY = 'I'.
          IDOC_STATUS-MSGID = 'YM'.
          IDOC_STATUS-MSGNO = '004'.
          IDOC_STATUS-MSGV1 = IT_LIKP-VSTEL.
          APPEND IDOC_STATUS.
          CLEAR IDOC_STATUS.
        ELSE.
          IDOC_STATUS-DOCNUM = IDOC_CONTRL-DOCNUM.
          IDOC_STATUS-STATUS = '51'.
          IDOC_STATUS-MSGTY = 'E'.
          IDOC_STATUS-MSGID = 'YM'.
          IDOC_STATUS-MSGNO = '005'.
          IDOC_STATUS-MSGV1 = IT_LIKP-VSTEL.
          APPEND IDOC_STATUS.
          CLEAR IDOC_STATUS.
          WORKFLOW_RESULT = C_WF_RESULT_ERROR.
          RETURN_VARIABLES-WF_PARAM = 'Error_Idocs'.
          RETURN_VARIABLES-DOC_NUMBER = IDOC_CONTRL-DOCNUM.
          APPEND RETURN_VARIABLES.
          CLEAR RETURN_VARIABLES.
        ENDIF.
        IF SY-SUBRC EQ 0.
          IDOC_STATUS-DOCNUM = IDOC_CONTRL-DOCNUM.
          IDOC_STATUS-STATUS = '53'.
          IDOC_STATUS-MSGTY = 'I'.
          IDOC_STATUS-MSGID = 'YM'.
          IDOC_STATUS-MSGNO = '004'.
          IDOC_STATUS-MSGV1 = IT_LIKP-LSTEL.
          APPEND IDOC_STATUS.
          CLEAR IDOC_STATUS.
        ELSE.
          IDOC_STATUS-DOCNUM = IDOC_CONTRL-DOCNUM.
          IDOC_STATUS-STATUS = '51'.
          IDOC_STATUS-MSGTY = 'E'.
          IDOC_STATUS-MSGID = 'YM'.
          IDOC_STATUS-MSGNO = '005'.
          IDOC_STATUS-MSGV1 = IT_LIKP-LSTEL.
          APPEND IDOC_STATUS.
          CLEAR IDOC_STATUS.
          WORKFLOW_RESULT = C_WF_RESULT_ERROR.
          RETURN_VARIABLES-WF_PARAM = 'Error_Idocs'.
          RETURN_VARIABLES-DOC_NUMBER = IDOC_CONTRL-DOCNUM.
          APPEND RETURN_VARIABLES.
          CLEAR RETURN_VARIABLES.
        ENDIF.
        IF SY-SUBRC EQ 0.
          IDOC_STATUS-DOCNUM = IDOC_CONTRL-DOCNUM.
          IDOC_STATUS-STATUS = '53'.
          IDOC_STATUS-MSGTY = 'I'.
          IDOC_STATUS-MSGID = 'YM'.
          IDOC_STATUS-MSGNO = '004'.
          IDOC_STATUS-MSGV1 = IT_LIKP-ROUTE.
          APPEND IDOC_STATUS.
          CLEAR IDOC_STATUS.
        ELSE.
          IDOC_STATUS-DOCNUM = IDOC_CONTRL-DOCNUM.
          IDOC_STATUS-STATUS = '51'.
          IDOC_STATUS-MSGTY = 'E'.
          IDOC_STATUS-MSGID = 'YM'.
          IDOC_STATUS-MSGNO = '005'.
          IDOC_STATUS-MSGV1 = IT_LIKP-ROUTE.
          APPEND IDOC_STATUS.
          CLEAR IDOC_STATUS.
          WORKFLOW_RESULT = C_WF_RESULT_ERROR.
          RETURN_VARIABLES-WF_PARAM = 'Error_Idocs'.
          RETURN_VARIABLES-DOC_NUMBER = IDOC_CONTRL-DOCNUM.
          APPEND RETURN_VARIABLES.
          CLEAR RETURN_VARIABLES.
        ENDIF.
        IF SY-SUBRC EQ 0.
          IDOC_STATUS-DOCNUM = IDOC_CONTRL-DOCNUM.
          IDOC_STATUS-STATUS = '53'.
          IDOC_STATUS-MSGTY = 'I'.
          IDOC_STATUS-MSGID = 'YM'.
          IDOC_STATUS-MSGNO = '004'.
          IDOC_STATUS-MSGV1 = IT_LIKP-KODAT.
          APPEND IDOC_STATUS.
          CLEAR IDOC_STATUS.
        ELSE.
          IDOC_STATUS-DOCNUM = IDOC_CONTRL-DOCNUM.
          IDOC_STATUS-STATUS = '51'.
          IDOC_STATUS-MSGTY = 'E'.
          IDOC_STATUS-MSGID = 'YM'.
          IDOC_STATUS-MSGNO = '005'.
          IDOC_STATUS-MSGV1 = IT_LIKP-KODAT.
          APPEND IDOC_STATUS.
          CLEAR IDOC_STATUS.
          WORKFLOW_RESULT = C_WF_RESULT_ERROR.
          RETURN_VARIABLES-WF_PARAM = 'Error_Idocs'.
          RETURN_VARIABLES-DOC_NUMBER = IDOC_CONTRL-DOCNUM.
          APPEND RETURN_VARIABLES.
          CLEAR RETURN_VARIABLES.
        ENDIF.
        IF SY-SUBRC EQ 0.
          IDOC_STATUS-DOCNUM = IDOC_CONTRL-DOCNUM.
          IDOC_STATUS-STATUS = '53'.
          IDOC_STATUS-MSGTY = 'I'.
          IDOC_STATUS-MSGID = 'YM'.
          IDOC_STATUS-MSGNO = '004'.
          IDOC_STATUS-MSGV1 = IT_LIKP-KUNNR.
          APPEND IDOC_STATUS.
          CLEAR IDOC_STATUS.
        ELSE.
          IDOC_STATUS-DOCNUM = IDOC_CONTRL-DOCNUM.
          IDOC_STATUS-STATUS = '51'.
          IDOC_STATUS-MSGTY = 'E'.
          IDOC_STATUS-MSGID = 'YM'.
          IDOC_STATUS-MSGNO = '005'.
          IDOC_STATUS-MSGV1 = IT_LIKP-KUNNR.
          APPEND IDOC_STATUS.
          CLEAR IDOC_STATUS.
          WORKFLOW_RESULT = C_WF_RESULT_ERROR.
          RETURN_VARIABLES-WF_PARAM = 'Error_Idocs'.
          RETURN_VARIABLES-DOC_NUMBER = IDOC_CONTRL-DOCNUM.
          APPEND RETURN_VARIABLES.
          CLEAR RETURN_VARIABLES.
        ENDIF.
        IF SY-SUBRC EQ 0.
          IDOC_STATUS-DOCNUM = IDOC_CONTRL-DOCNUM.
          IDOC_STATUS-STATUS = '53'.
          IDOC_STATUS-MSGTY = 'I'.
          IDOC_STATUS-MSGID = 'YM'.
          IDOC_STATUS-MSGNO = '004'.
          IDOC_STATUS-MSGV1 = SY-DATLO.
          APPEND IDOC_STATUS.
          CLEAR IDOC_STATUS.
        ELSE.
          IDOC_STATUS-DOCNUM = IDOC_CONTRL-DOCNUM.
          IDOC_STATUS-STATUS = '51'.
          IDOC_STATUS-MSGTY = 'E'.
          IDOC_STATUS-MSGID = 'YM'.
          IDOC_STATUS-MSGNO = '005'.
          IDOC_STATUS-MSGV1 = SY-DATLO.
          APPEND IDOC_STATUS.
          CLEAR IDOC_STATUS.
          WORKFLOW_RESULT = C_WF_RESULT_ERROR.
          RETURN_VARIABLES-WF_PARAM = 'Error_Idocs'.
          RETURN_VARIABLES-DOC_NUMBER = IDOC_CONTRL-DOCNUM.
          APPEND RETURN_VARIABLES.
          CLEAR RETURN_VARIABLES.
        ENDIF.
        IF SY-SUBRC EQ 0.
          IDOC_STATUS-DOCNUM = IDOC_CONTRL-DOCNUM.
          IDOC_STATUS-STATUS = '53'.
          IDOC_STATUS-MSGTY = 'I'.
          IDOC_STATUS-MSGID = 'YM'.
          IDOC_STATUS-MSGNO = '004'.
          IDOC_STATUS-MSGV1 = IT_LIKP-WBSTK.
          APPEND IDOC_STATUS.
          CLEAR IDOC_STATUS.
        ELSE.
          IDOC_STATUS-DOCNUM = IDOC_CONTRL-DOCNUM.
          IDOC_STATUS-STATUS = '51'.
          IDOC_STATUS-MSGTY = 'E'.
          IDOC_STATUS-MSGID = 'YM'.
          IDOC_STATUS-MSGNO = '005'.
          IDOC_STATUS-MSGV1 = IT_LIKP-WBSTK.
          APPEND IDOC_STATUS.
          CLEAR IDOC_STATUS.
          WORKFLOW_RESULT = C_WF_RESULT_ERROR.
          RETURN_VARIABLES-WF_PARAM = 'Error_Idocs'.
          RETURN_VARIABLES-DOC_NUMBER = IDOC_CONTRL-DOCNUM.
          APPEND RETURN_VARIABLES.
          CLEAR RETURN_VARIABLES.
        ENDIF.
    endloop.
    endfunction.

    Hi,
    First goto WE20-> click on the logical system , now select the receiver LS which you are using as your partner. Now in the inbound parameters cehck what is the process code is attached.
    once you get the process code then go to WE42 tcode.. there you give the process code and then double click you will get the function module IDOC_INPUT_FIDCMT.
    Hopw you got my point.
    Regards,
    Nagaraj

  • IDOC posted with error

    Hi
    working on File2 IDOC scenario..my idoc posted .. but that is red and green in SXMB_MONI... where should I check for correct the problem?

    I am getting error like this :(SXMB_MONI)
      <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Call Adapter
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
      <SAP:Category>XIAdapter</SAP:Category>
      <SAP:Code area="IDOC_ADAPTER">ATTRIBUTE_IDOC_METADATA</SAP:Code>
      <SAP:P1>I::000</SAP:P1>
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>Error: I::000</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    please help me

  • How to Debug IDOC posting

    Hi,
       Could anyone please advise how to debug an IDOC posting. I am new to ABAP.
    regards,
    Munavar Basha A.K.

    Hi,
    1)Use tcode we19 , enter your idoc no and click on the inbound function module push button then check call in debugging mode to debug.
    or
    1. Go to BD87
    2. make a right click at the IDoc and choose restrict and process.
    3. delete the check at the bottom(Background Processing)
    4. Go ahead
    5. edit -> process -> Foreground at Error
    Thanks Hope this will be Helpful
    Thanks
    Kalyan

  • What triggers idoc posting in outbound message from sap ?

    Do change or create events can be used to trigger Posting to IDOC? Have any body used idoc for outbound message sending from SAP?

    Hi Reddy,
    Posting IDoc Packets
    Two groups of function modules are used to post IDocs:
    · Function modules which process IDocs in mass. These transfer packets of IDocs for which individual IDocs are updated in the same Logical Unit of Work (LUW).
    · Function modules which process one IDoc per call.
    · INPUTTYP contains the code for posting function modules.
    To display the function module's INPUTTYP on the ALE Development screen, choose IDoc ® Inbound Processing ® Function Module® Maintain Attributes (BD51).
    INPUTTYP can contain the following values:
    · "0", for function modules which process IDocs in packets.
    "1" and "2" for function modules which process one IDoc per call:
    If you post the IDocs immediately, the SAP sending system determines the packet size. ALE inbound processing can recognize if the posting function module allows packet processing and if so, passes the IDoc packet to it. If not, the IDoc packet is split into individual IDocs.
    If IDocs are posted in the background, you can specify the size of the IDocs to be generated in the program RBDAPP01.
    If you use function modules that can process IDocs in mass, the database load is reduced.
    If you group IDocs into packets, this may also be practical for function modules that post inbound IDocs one at a time, because the ALE layer calls the function module several times in the same dialog process, thereby reducing the administrative load on the SAP system.
    If program RBDAPP01 carries out the background processing, as a guide, you should use a packet size of between 20 and 100 IDocs.
    Packet processing and parallelism complement one another. Packet processing and parallelism complement each other, although in some situations they may compete with each other. If the size of the packet is too big, this may mean that not all the available dialog processes are being used.
    Scheduling IDoc Posting  
    There are two ways of posting IDocs in ALE inbound processing:
    ·        Immediate processing:
    Upon receipt inbound IDocs are immediately released for posting. ALE inbound processing splits the IDoc packets into individual IDocs.
    ·        Background processing
    Inbound IDocs and IDoc packets are first saved in the database. IDoc packets are split into single IDocs beforehand.
    The program RBDAPP01 later releases the saved IDocs for processing. Single IDocs can be put into packets and then processed.
    Perform the following steps:
    1.       Set-up background processing (IDoc/ALE area menu):
    IDoc Interface/ALE ® Administration ® Runtime Settings ® Partner Profiles (WE20)
    Then the required setting is: In the detail screen Inbound Parameters select the option Trigger by background program.
    2.       Schedule posting (ALE customizing):
    Transaction SALE ® Set-Up System Monitoring ®
             Posting IDocs in Recipient System ®Schedule
    You can also process the IDocs manually by passing them to the posting function module.  In ALE Administration choose Monitoring ®Status Monitor (BD87), select the IDocs and then select Process.
    Regards,
    Kumar.

  • IDOC POsting Error: Transition no. OBJ_SYS is blocked by another user

    Hi Experts,
    I m sending the XML from a third party system into SAP using XI as middleware for IDOC posting (FB01).
    I m getting an error <b>Transition no. <xx> is blocked by another user</b> while sending intercompany and cash applications. SAP is unable to process such XML directly.
    But if i login to SAP and mannually post the IDOC, it is getting posted successfully.
    Any idea what may be the cause?
    Useful answers will be rewarded for sure.
    Regards
    DhanyaR Nair

    Hi Dhanya,
            In your inbound idoc processing program, pls do use the lock mechanism for the FI document which you are processing and if it cannot be locked then keep it on wait for sometime and check for the same.
            If its a standard program check whether it can be done in XI.
          When SAP is locking the transaction it will be unlocked after the commit work and hence its happening.
      The reason why you may not be getting this in individual processing is that you are doing the same thru a single session. And the lock if am not wrong is happening in table level and not in record level.
    Cheers
    JK

  • Response for successful Idoc post

    Hi,
    Curerently we are in the designing specifications phase of a project where there is a requirement which i am not sure if it can be achieved or not, hope i can get some help here.
    The interface flow would be an File to Idoc scenario where multiple Idocs will be posted in the ECC system. The requirement that our client wants is to get an acknowledgement from the ECC system for the log of the number of Idocs posted. Say that there are 4 Idoc data present in a single file and gets posted in the ECC system, i believe there will be 4 entries in the ECC system and is there a possibilty that i could get a single acknowledgement for the 4 Idocs posted ?
    Please let me know if this can be achived and how it can be done or is there an alternate suggestion for this requirement.
    Thanks & Regards,
    Sherin Jose P

    Hi Sherin Jose P,
    You could have used "Idoc Acknowledgements" feature provided by SAP. But this is possible with Idoc to Idoc scenario. Since you have File to Idoc, check if you can adapt the Idoc Acknowledgements for the file part of the interface.
    Idoc Acknowledgement basically sends an acknowledgement Idoc (ALEAUD) to the sender which contains details about all Idocs posted in the target system. Check if you can map ALEAUD Idoc structure to your file structure.
    - Netrey

  • IDOC Posting _Outbound

    Hi XI Experts,
                 I am doing an idoc to file scenario and i have an abap report which used the FM master_idoc_distribure to send the idoc. The idoc gets posted with status 03, but in sxmb_moni i donot see any thing.There is no entry in idx5 for the idoc posted by the report.
    If i use we19 with the same idoc number then my interface works and i see an entry in moni.
    Any inputs? What has possibly went wrong?
    Regards,
    Anirban

    Hi Anirban,
    After you call FM master_idoc_distribute, you need to add the following code:
      COMMIT WORK.
      CALL FUNCTION 'DEQUEUE_ALL'
        EXPORTING
          _SYNCHRON = ' '.
    This should then send your idoc.
    Hope that this helps,
    Thanks,
    Miguel

Maybe you are looking for

  • Inbound Error message in SMQ2

    Dear All Experts, 1 ) I am facing one error in SMQ2 of SRM sytem that XI restart in qRFC not allowed. I am having the scenario ECC->XI->SRM. The messages are getting stuck in both XI system and SRM system. The contents of the errored message in SRM i

  • Waiting for a credit to be issued for a returned device that has been returned!

    Since November 12, 2013 we have been waiting for Verizon to issue a credit on a returned phone for $450. Verizon has the tracking number it was delivered to the warehouse 9/25/13...We have called numerous times at least 7 or 8 times, I have sent 16 e

  • Stock Posing Error ( Very Urgent )

    Hi All, While doing stock posting, I am getting error like " GL account 310050 is not in the company code 3999. Please can any body help me on this. Regards Sankar

  • Mac Running Slow after Yosemite

    I have upgraded this machine but now applications hang.  I have cleared the cache, deleted applications such as Chrome, repaired  permissions and turned off any start up applications. This is the EtreCheck output.  I am not sure how to read it - are

  • Import Object

    Hello, Does anyone know how do I work with Import Object in Siebel 7.5? Another question is how can I debug and see what fails? I am trying to import service requests data from a csv, comma delimited file. I defined an import object over the SR busin