How to create a IDOC program

Hi All
i have a requirement where i have to design a screen program to provide the user with a input screen. The user will input data on this screen, after the user enters the data and clicks on execute or some button on the module screen the system must generate a IDOC in the system. This IDOC will be picked up from another program within the same system.The reason we are doing this is the other program cannot be changed and it can accept only an IDOC from the external system which we are going to eliminate.
My Questions:
1. What are the steps in this requirement
2. Do we require the partner profile and port and logical system definition as i am going to create a IDOC in the same system.( i am not sending the IDOC out of the system)
3. Can i use the MASTER_IDOC_DISTRIBUTE FM to create a IDOC in the database?
4. Can i use IDOC_CREATE_ON_DATABASE FM to do the same job?
please guide me with deatils on how to go about this. Thanks
~Suresh

Hi Suresh,
First try to create a Module pool program.
Assign the tcode to the IDOC.
or else get the data into IDOC segment and try to transfer it.
Creation of IDoc
To Create Idoc we need to follow these steps:
Create Segment ( WE31)
Create Idoc Type ( WE30)
Create Message Type ( WE81)
Assign Idoc Type to Message Type ( WE82)
Creating a Segment
Go to transaction code WE31
Enter the name for your segment type and click on the Create icon
Type the short text
Enter the variable names and data elements
Save it and go back
Go to Edit -> Set Release
Follow steps to create more number of segments
Create IDOC Type
Go to transaction code WE30
Enter the Object Name, select Basic type and click Create icon
Select the create new option and enter a description for your basic IDOC type and press enter
Select the IDOC Name and click Create icon
The system prompts us to enter a segment type and its attributes
Choose the appropriate values and press Enter
The system transfers the name of the segment type to the IDOC editor.
Create IDOC Type
Follow these steps to add more number of segments to Parent or as Parent-child relation
Save it and go back
Go to Edit -> Set release
Create Message Type
Go to transaction code WE81
Change the details from Display mode to Change mode
After selection, the system will give this message “The table is cross-client (see Help for further info)”. Press Enter
Click New Entries to create new Message Type
Fill details
Save it and go back
Assign Message Type to IDoc Type
Go to transaction code WE82
Change the details from Display mode to Change mode
After selection, the system will give this message “The table is cross-client (see Help for further info)”. Press Enter.
Click New Entries to create new Message Type.
Fill details
Save it and go back
u can also check all these links related to idocs
http://www.allsaplinks.com/idoc_sample.html
http://www.allsaplinks.com/
http://www.sap-img.com/
http://www.sappoint.com/abap.html
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDALEIO/BCMIDALEIO.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDALEPRO/BCMIDALEPRO.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFAALEQS/CABFAALEQS.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVEDISC/CAEDISCAP_STC.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVEDI/CAEDI.pdf
http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
http://www.sapgenie.com/sapedi/index.htm
http://expertanswercenter.techtarget.com/eac/knowledgebaseCategory/0,295197,sid63_tax296858_idx0_off50,00.html
http://sap.ittoolbox.com/documents/popular-q-and-a/extending-a-basic-idoc-type-2358
http://help.sap.com/saphelp_47x200/helpdata/en/dc/6b7eee43d711d1893e0000e8323c4f/frameset.htm
/thread/199996 [original link is broken]
Regards,
Priyanka.

Similar Messages

  • How to create Inbound Idoc from XML file-Need help urgently

    Hi,
    can any one tell how to create inbound Idoc from XML file.
    we have xml file in application server Ex. /usr/INT/SMS/PAYTEXT.xml'  we want to generate inbound idoc from this file.we are successfully able to generate outbound XML file from outbound Idoc by using the XML port. But not able to generate idoc from XML file by using we19 or we16.
    Please let me know the process to trigger inbound Idoc with out using  XI and any other components.
    Thanks in advance
    Dora Reddy

    Hi .. Did either of you get a result on this?
    My question is the same really .. I am testing with WE19 and it seems SAP cannot accept an XML inbound file as standard.
    I see lots of mention of using a Function Module.
    Am I correct in saying therefore that ABAP development is required to create a program to run the FM and process the idoc?
    Or is there something tht can be done with Standard SAP?
    Thanks
    Lee

  • HOW TO CREATE A DRILLDOWN PROGRAM NEED EXAMPLE

    HAI FRIENDS
      1  I WANT TO KNOW HOW TO CREATE A DRILLDOWN PROGRAM NEED EXAMPLE IN ABAP
      2 NEED ABAP PROGRAM EBOOK
    PLZ DO IT

    CHECK THIS ALV DRILL DOWN REPORT
    *& Report  ZHAI_SD_CUSTOMER_DETAILS_ALV
    REPORT  ZHAI_SD_CUSTOMER_DETAILS_ALV.
    TYPE-POOLS: SLIS.
        TYPES DECLARATIONS
    TABLES : KNA1.
    DATA : BEGIN OF IT_CUST OCCURS 0,
      KUNNR LIKE KNA1-KUNNR,
      NAME1 LIKE KNA1-NAME1,
      LAND1 LIKE KNA1-LAND1,
      ORT01 LIKE KNA1-ORT01,
      STRAS LIKE KNA1-STRAS,
      PSTLZ LIKE KNA1-PSTLZ,
           END OF IT_CUST.
    DATA:BEGIN OF IT_SALE OCCURS 0,
    VBELN LIKE VBAK-VBELN,"SALES DOC NO
    AUDAT LIKE VBAK-AUDAT,"DATE RECIEVED AND SENT
    AUART LIKE VBAK-AUART,"SALES DOC LIKE
    NETWR LIKE VBAK-NETWR,"NET VALUE IN DOC CURRENCY
    KUNNR LIKE VBAK-KUNNR,
          END OF IT_sale.
    TYPES: BEGIN OF TY_ITEM,
    VBELN TYPE VBAP-VBELN,
    POSNR TYPE VBAP-POSNR,"ITEM NO
    MATNR TYPE VBAP-MATNR,"MATERIAL NO
    CHARG TYPE VBAP-CHARG,"BATCH
    MATKL TYPE VBAP-MATKL,"MATERIAL GROUP
    MEINS TYPE VBAP-MEINS,"BASE UNIT OF MEASURE
    END OF TY_ITEM.
    SELECT-OPTIONS : S_KUNNR FOR KNA1-KUNNR.
         INTERNAL TABLES
    DATA:
         IT_CUST  TYPE TABLE OF TY_CUST,
         IT_SALE  TYPE TABLE OF TY_SALE,
          IT_ITEM  TYPE TABLE OF TY_ITEM.
                       INTERNAL TABLES FOR ALV
    DATA: IT_FCAT   TYPE  SLIS_T_FIELDCAT_ALV,
          IT_FCAT1  TYPE  SLIS_T_FIELDCAT_ALV,
          IT_FCAT3  TYPE SLIS_T_FIELDCAT_ALV.
    DATA: IT_EVENTS TYPE TABLE OF   slis_alv_event,
          IT_EVENTS1 TYPE TABLE OF SLIS_ALV_EVENT,
          IT_EVENTS2 TYPE TABLE OF SLIS_ALV_EVENT.
    DATA: IT_LISTHEADER1 TYPE SLIS_T_LISTHEADER,
          IT_LISTHEADER TYPE TABLE OF slis_listheader,
          IT_LISTHEADER3 TYPE TABLE OF SLIS_LISTHEADER,
          IT_FOOTER TYPE TABLE OF SLIS_LISTHEADER.
    DATA: IT_SORT TYPE SLIS_T_SORTINFO_ALV,
          WA_SORT LIKE LINE OF IT_SORT.
                       WORK AREAS FOR ALV
    DATA: WA_LAYOUT  TYPE SLIS_LAYOUT_ALV,
          WA_LAYOUT1 TYPE SLIS_LAYOUT_ALV,
          WA_FCAT    LIKE LINE OF IT_FCAT,
          WA_FCAT1   LIKE LINE OF IT_FCAT1,
          WA_FCAT3   LIKE LINE OF IT_FCAT3,
          WA_EVENTS  LIKE LINE OF IT_EVENTS,
          WA_EVENTS1 LIKE LINE OF IT_EVENTS,
          WA_EVENTS2 LIKE LINE OF IT_EVENTS.
            WORK VARIABLES
    DATA: W_REPID TYPE SY-REPID,
          W_KUNNR TYPE KNA1-KUNNR.
    $$**----
       WORK  AREAS
        MACROS
    DEFINE ADD_FCAT1..
    WA_FCAT1-COL_POS = &1.
    WA_FCAT1-FIELDNAME = &2.
    WA_FCAT1-TABNAME = &3.
    WA_FCAT1-REF_TABNAME = &4.
    WA_FCAT1-KEY = &5.
    WA_FCAT1-DO_SUM = &6.
    WA_FCAT1-HOTSPOT = &7.
    WA_FCAT1-EMPHASIZE = &8.
    APPEND WA_FCAT1 TO IT_FCAT1.
    END-OF-DEFINITION.
    START-OF-SELECTION.
      PERFORM F_GET_DATA.
      PERFORM F_BUILD_FCAT.
      PERFORM F_GET_EVENTS.
      PERFORM F_BUILD_LAYOUT USING WA_LAYOUT.
      PERFORM F_GET_DISPLAY.
    *&      Form  F_GET_DATA
    FORM F_GET_DATA .
    SELECT   KUNNR
              NAME1
              LAND1
              ORT01
              STRAS
              PSTLZ FROM KNA1
              INTO TABLE
    IT_CUST WHERE KUNNR IN S_KUNNR.
    ENDFORM.                    " F_GET_DATA
    *&      Form  F_GET_DISPLAY
          text
    -->  p1        text
    <--  p2        text
    FORM F_GET_DISPLAY .
    CLEAR W_REPID.
    MOVE SY-REPID TO W_REPID.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
         I_CALLBACK_PROGRAM                = w_repid
      I_CALLBACK_PF_STATUS_SET          = ' '
      I_CALLBACK_USER_COMMAND           = ' '
         I_CALLBACK_TOP_OF_PAGE            = 'F_TOP_OF_PAGE'
      I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
      I_CALLBACK_HTML_END_OF_LIST       = ' '
      I_STRUCTURE_NAME                  =
      I_BACKGROUND_ID                   = 'DUCK'
      I_GRID_TITLE                      =
      I_GRID_SETTINGS                   =
       IS_LAYOUT                         = WA_LAYOUT
         IT_FIELDCAT                        = IT_FCAT
      IT_EXCLUDING                      =
      IT_SPECIAL_GROUPS                 =
      IT_SORT                           =
      IT_FILTER                         =
      IS_SEL_HIDE                       =
      I_DEFAULT                         = 'X'
      I_SAVE                            = ' '
      IS_VARIANT                        =
         IT_EVENTS                          = IT_EVENTS
      IT_EVENT_EXIT                     =
      IS_PRINT                          =
      IS_REPREP_ID                      =
      I_SCREEN_START_COLUMN             = 0
      I_SCREEN_START_LINE               = 0
      I_SCREEN_END_COLUMN               = 0
      I_SCREEN_END_LINE                 = 0
      I_HTML_HEIGHT_TOP                 = 0
      I_HTML_HEIGHT_END                 = 0
      IT_ALV_GRAPHICS                   =
      IT_HYPERLINK                      =
      IT_ADD_FIELDCAT                   =
      IT_EXCEPT_QINFO                   =
      IR_SALV_FULLSCREEN_ADAPTER        =
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER           =
      ES_EXIT_CAUSED_BY_USER            =
        TABLES
          T_OUTTAB                          = IT_CUST
    EXCEPTIONS
      PROGRAM_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.
    ENDFORM.                    " F_GET_DISPLAY
    *&      Form  F_GET_EVENTS
          text
    -->  p1        text
    <--  p2        text
    FORM F_GET_EVENTS .
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
        EXPORTING
          I_LIST_TYPE     = 0
        IMPORTING
          ET_EVENTS       = IT_EVENTS
        EXCEPTIONS
          LIST_TYPE_WRONG = 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.
      SORT IT_EVENTS.
    READ TABLE IT_EVENTS INTO WA_EVENTS
    WITH KEY NAME = 'TOP_OF_PAGE' BINARY SEARCH.
    IF SY-SUBRC EQ 0.
    WA_EVENTS-FORM = 'F_TOP_OF_PAGE'.
    MODIFY  IT_EVENTS  INDEX SY-TABIX FROM
    WA_EVENTS TRANSPORTING FORM.
      ENDIF.
    READ TABLE IT_EVENTS INTO WA_EVENTS
    WITH KEY NAME = 'USER_COMMAND' BINARY SEARCH.
    IF SY-SUBRC EQ 0.
    WA_EVENTS-FORM = 'F_USER_COMMAND'.
    MODIFY IT_EVENTS FROM WA_EVENTS INDEX
    SY-TABIX TRANSPORTING FORM.
    READ TABLE IT_EVENTS INTO WA_EVENTS
    WITH KEY NAME = 'USER_COMMAND' BINARY SEARCH.
    ENDIF.
    READ TABLE IT_EVENTS INTO WA_EVENTS WITH
    KEY NAME = 'END_OF_PAGE' BINARY SEARCH.
    IF SY-SUBRC EQ 0.
    WA_EVENTS-FORM = 'F_END_OF_PAGE'.
    MODIFY IT_EVENTS FROM WA_EVENTS
    INDEX SY-TABIX TRANSPORTING FORM.
    ENDIF.
    ENDFORM.                    "F_GET_EVENTS
    *&      Form  F_BUILD_LAYOUT
    FORM F_BUILD_LAYOUT  USING P_WA_LAYOUT LIKE WA_LAYOUT .
    CLEAR P_WA_LAYOUT.
    P_WA_LAYOUT-COLWIDTH_OPTIMIZE = 'X'.
    *P_WA_LAYOUT-F2CODE = '&ETA'.
    *p_wa_layout-detail_popup = 'X'.
    P_WA_LAYOUT-DETAIL_TITLEBAR = 'ALV REPORT'.
    *P_WA_LAYOUT-CONFIRMATION_PROMPT  = 'X'.
    ENDFORM.                    " F_BUILD_LAYOUT
    *&      Form  F_TOP_OF_PAGE
    FORM F_TOP_OF_PAGE .
    refresh it_listheader.
      DATA: LS_LIST TYPE SLIS_LISTHEADER.
      LS_LIST-TYP = 'H'.
      LS_LIST-INFO = TEXT-004.
      APPEND LS_LIST TO IT_LISTHEADER.
      LS_LIST-typ = 'S'.
      LS_LIST-key = 'Date: '.
      CONCATENATE sy-datum+6(2) '.'
      sy-datum+4(2) '.'
      sy-datum(4) INTO LS_LIST-info. "todays date
      append LS_LIST to IT_LISTHEADER.
      clear: LS_LIST.
      LS_LIST-TYP = 'S'.
      LS_LIST-KEY = 'DEVELOPED:'.
      LS_LIST-INFO = SY-UNAME.
      APPEND LS_LIST TO IT_LISTHEADER.
      CLEAR LS_LIST.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          IT_LIST_COMMENTARY = IT_LISTHEADER
          I_LOGO             = 'GLOBAL'.
    ENDFORM.                    " F_TOP_OF_PAGE
    *&      Form  F_BUILD_FCAT
    FORM F_BUILD_FCAT .
    CLEAR: W_REPID,
           IT_FCAT.
      MOVE SY-REPID TO W_REPID.
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
       EXPORTING
         I_PROGRAM_NAME               = W_REPID
         I_INTERNAL_TABNAME           = 'IT_CUST'
         I_INCLNAME                   = W_REPID
        CHANGING
          CT_FIELDCAT                  = IT_FCAT
    EXCEPTIONS
       INCONSISTENT_INTERFACE       = 1
       PROGRAM_ERROR                = 2
       OTHERS                       = 3
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " F_BUILD_FCAT
    *&      Form  F_USER_COMMAND
    FORM F_USER_COMMAND USING R_UCOMM LIKE SY-UCOMM
                              RS_SELFIELD TYPE SLIS_SELFIELD.
    CASE  R_UCOMM.
    WHEN '&IC1'.
    IF RS_SELFIELD-FIELDNAME = 'KUNNR'.
    READ TABLE IT_CUST
    INDEX RS_SELFIELD-TABINDEX.
    MOVE rs_selfield-value TO W_KUNNR.
    IF IT_CUST IS NOT INITIAL.
       PERFORM F_GET_SECONDARY_DATA.
       PERFORM F_BUILD_FCAT1.
       PERFORM F_BUILD_EVENTS.
       PERFORM F_GET_SORT.
       PERFORM F_BUILD_LAYOUT1.
      PERFORM F_GET_DISPLAY1.
    ENDIF.
      ENDIF.
      ENDCASE.
    ENDFORM.                    " F_USER_COMMAND
    *&      Form  F_GET_SECONDARY_DATA
    FORM F_GET_SECONDARY_DATA .
    data:v_data.
    SELECT  VBELN
              AUDAT
              AUART
              NETWR
    KUNNR FROM VBAK INTO TABLE IT_SALE
    WHERE KUNNR EQ IT_CUST-KUNNR.
      IF IT_SALE[] IS INITIAL .
       CALL FUNCTION 'POPUP_TO_CONFIRM'
         EXPORTING
          TITLEBAR                    = SY-REPID
         DIAGNOSE_OBJECT             = ' '
           TEXT_QUESTION               = 'NO SALES FOR THIS CUSTOMER'
         TEXT_BUTTON_1               = 'Ja'(001)
         ICON_BUTTON_1               = ' '
         TEXT_BUTTON_2               = 'Nein'(002)
         ICON_BUTTON_2               = ' '
          DEFAULT_BUTTON              = '1'
          DISPLAY_CANCEL_BUTTON       = 'X'
         USERDEFINED_F1_HELP         = ' '
         START_COLUMN                = 25
         START_ROW                   = 6
         POPUP_TYPE                  =
         IV_QUICKINFO_BUTTON_1       = ' '
         IV_QUICKINFO_BUTTON_2       = ' '
        IMPORTING
          ANSWER                      = v_data
       TABLES
         PARAMETER                   =
        EXCEPTIONS
          TEXT_NOT_FOUND              = 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.
    case v_data.
    when '2'.
    leave screen.
    when 'A'.
    leave to screen '0'.
    endcase.
      ENDIF.
    ENDFORM.                    " F_GET_SECONDARY_DATA
    *&      Form  F_BUILD_FCAT1
    FORM F_BUILD_FCAT1 .
    REFRESH IT_FCAT1.
    CLEAR WA_FCAT1.
    ADD_FCAT1:
    '1' 'VBELN' 'VBAK' 'VBAK' 'X' ' ' 'X' 'C500',
    '2' 'AUDAT' 'VBAK' 'VBAK' ' ' ' ' ' ' 'C400',
    '3' 'AUART' 'VBAK' 'VBAK' ' ' ' ' ' ' 'C100',
    '4' 'NETWR' 'VBAK' 'VBAK' ' ' 'X' ' ' 'C300'.
    ENDFORM.                    " F_BUILD_FCAT1
    *&      Form  F_GET_DISPLAY1
          text
    -->  p1        text
    <--  p2        text
    FORM F_GET_DISPLAY1 .
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
         I_CALLBACK_PROGRAM                = SY-REPID
      I_CALLBACK_PF_STATUS_SET          = ' '
        I_CALLBACK_USER_COMMAND           =  'F_USER_COMMAND1'
         I_CALLBACK_TOP_OF_PAGE            = 'F_TOP_OF_PAGE1'
      I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
      I_CALLBACK_HTML_END_OF_LIST       = ' '
      I_STRUCTURE_NAME                  =
      I_BACKGROUND_ID                   = ' '
      I_GRID_TITLE                      =
      I_GRID_SETTINGS                   =
      IS_LAYOUT                         =
         IT_FIELDCAT                       = IT_FCAT1
      IT_EXCLUDING                      =
      IT_SPECIAL_GROUPS                 =
       IT_SORT                            = IT_SORT
      IT_FILTER                         =
      IS_SEL_HIDE                       =
      I_DEFAULT                         = 'X'
      I_SAVE                            = ' '
      IS_VARIANT                        =
         IT_EVENTS                         = IT_EVENTS1
      IT_EVENT_EXIT                     =
      IS_PRINT                          =
      IS_REPREP_ID                      =
      I_SCREEN_START_COLUMN             = 0
      I_SCREEN_START_LINE               = 0
      I_SCREEN_END_COLUMN               = 0
      I_SCREEN_END_LINE                 = 0
      I_HTML_HEIGHT_TOP                 = 0
      I_HTML_HEIGHT_END                 = 0
      IT_ALV_GRAPHICS                   =
      IT_HYPERLINK                      =
      IT_ADD_FIELDCAT                   =
      IT_EXCEPT_QINFO                   =
      IR_SALV_FULLSCREEN_ADAPTER        =
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER           =
      ES_EXIT_CAUSED_BY_USER            =
        TABLES
          T_OUTTAB                          = IT_SALE
    EXCEPTIONS
      PROGRAM_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.
    ENDFORM.                    " F_GET_DISPLAY1
    *&      Form  F_BUILD_EVENTS
    FORM F_BUILD_EVENTS .
    clear wa_events1.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
       EXPORTING
         I_LIST_TYPE           = 0
       IMPORTING
         ET_EVENTS             = IT_EVENTS1.
    EXCEPTIONS
      LIST_TYPE_WRONG       = 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.
      SORT IT_EVENTS1.
      read table It_events1 with key name = 'TOP_OF_PAGE'
      into WA_eventS1.
      if sy-subrc = 0.
        move 'F_TOP_OF_PAGE1' to WA_EventS1-form.
        append WA_eventS1 to it_events1.
      endif.
      READ TABLE IT_EVENTS WITH KEY NAME = 'USER_COMMAND'
      INTO WA_EVENTS1.
      IF SY-SUBRC = 0.
      MOVE 'F_USER_COMMAND1' TO WA_EVENTS1-FORM.
      APPEND WA_EVENTS1 TO IT_EVENTS1.
      ENDIF.
    *READ TABLE IT_EVENTS WITH KEY NAME = 'SUBTOTAL_TEXT'
    INTO WA_EVENTS1.
    IF SY-SUBRC = 0.
    MOVE 'F_SUBTOTAL_TEXT' TO WA_EVENTS1-FORM.
    APPEND WA_EVENTS1 TO IT_EVENTS1.
    ENDIF.
    ENDFORM.                    " F_BUILD_EVENTS
    *&      Form  F_TOP_OF_PAGE1
    FORM F_TOP_OF_PAGE1 .
    DATA: LS_HEADER TYPE SLIS_LISTHEADER.
    REFRESH : IT_LISTHEADER1.
      LS_HEADER-TYP = 'H'.
      LS_HEADER-INFO = 'SALES ORDER DETAILS FOR CUSTOMER'.
      APPEND LS_HEADER TO it_listheader1.
      CLEAR LS_HEADER.
      LS_HEADER-TYP  = 'S'.
      LS_HEADER-KEY = 'CUSTOMER NO:'.
      LS_HEADER-INFO = W_KUNNR.
      APPEND LS_HEADER TO IT_LISTHEADER1.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          IT_LIST_COMMENTARY       = IT_LISTHEADER1
         I_LOGO                   = 'DUCK'
      I_END_OF_LIST_GRID       =
      I_ALV_FORM               =
    ENDFORM.                    " F_TOP_OF_PAGE
    *&      Form  F_END_OF_PAGE
          text
    -->  p1        text
    <--  p2        text
    FORM F_END_OF_PAGE .
    DATA:LS_FOOTER TYPE SLIS_LISTHEADER.
    LS_FOOTER-TYP = 'S'.
    LS_FOOTER-KEY = SY-UNAME.
    LS_FOOTER-INFO = 'DEVELOPED BY:'.
    APPEND LS_FOOTER TO IT_FOOTER.
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
      EXPORTING
        IT_LIST_COMMENTARY       = IT_FOOTER
    ENDFORM.                    " F_END_OF_PAG
    *&      Form  F_USER_COMMAND1
          text
    -->  p1        text
    <--  p2        text
    FORM F_USER_COMMAND1 USING R_UCOMM LIKE SY-UCOMM
                               RS_SELFIELD TYPE SLIS_SELFIELD.
    CASE R_UCOMM.
    WHEN '&IC1'.
    READ TABLE IT_SALE INDEX RS_SELFIELD-TABINDEX.
    PERFORM F_GET_SECONDARY2.
    PERFORM F_GET_FCAT3 USING:
    'VBELN' '1' 'C' '12' 'SALES_DOC'   'M'  'VBAP' 'X' 'C51' ' ',
    'POSNR' '2' ' '  '5' 'ITEM_NO'      'M'  'VBAP' ' ' 'C61' ' ',
    'MATNR' '3' ' '  '12' 'MATERIAL_NO' 'M'  'VBAP' ' ' 'C71' ' ',
    'CHARG' '4' ' ' '10' 'BATCH_NO'    'M'  'VBAP' ' ' 'C41' ' ',
    'MATKL' '5' ' ' '10' 'MAT_GROUP'   'M'  'VBAP' ' ' 'C31' ' ',
    'MEINS' '6' ' ' '12' 'BASE_UNIT'   'M'  'VBAP' ' ' 'C21' 'X' .
    PERFORM F_GET_EVENTS2 USING WA_EVENTS2
                         CHANGING IT_EVENTS2.
    PERFORM F_GET_DISPLAY3.
    REFRESH IT_FCAT3.
    ENDCASE.
    ENDFORM.                    " F_USER_COMMAND1
    *&      Form  F_GET_SECONDARY2
          text
    -->  p1        text
    <--  p2        text
    FORM F_GET_SECONDARY2 .
    SELECT VBELN
           POSNR
           MATNR
           MATKL
           MEINS
           FROM VBAP INTO
           TABLE IT_ITEM WHERE
           VBELN EQ IT_SALE-VBELN.
    IF SY-DBCNT EQ 0.
    MESSAGE E000(ZHAI) WITH TEXT-KO1.
    ENDIF.
    ENDFORM.                    " F_GET_SECONDARY2
    *&      Form  F_GET_DISPLAY3
          text
    -->  p1        text
    <--  p2        text
    FORM F_GET_DISPLAY3 .
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
       I_CALLBACK_PROGRAM                = SY-REPID
       I_CALLBACK_PF_STATUS_SET          = 'F_PF_STATUS'
      I_CALLBACK_USER_COMMAND           = ' '
      I_CALLBACK_TOP_OF_PAGE            = 'F_TOP_OF_PAGE3'
       I_CALLBACK_HTML_TOP_OF_PAGE       = 'F_TOP_OF_PAGE3'
      I_CALLBACK_HTML_END_OF_LIST       = ' '
      I_STRUCTURE_NAME                  =
      I_BACKGROUND_ID                   = ' '
      I_GRID_TITLE                      =
      I_GRID_SETTINGS                   =
       IS_LAYOUT                         = WA_LAYOUT1
       IT_FIELDCAT                       = IT_FCAT3
      IT_EXCLUDING                      =
      IT_SPECIAL_GROUPS                 =
      IT_SORT                           = IT_SORT
      IT_FILTER                         =
      IS_SEL_HIDE                       =
      I_DEFAULT                         = 'X'
      I_SAVE                            = ' '
      IS_VARIANT                        =
       IT_EVENTS                         = IT_EVENTS2
      IT_EVENT_EXIT                     =
      IS_PRINT                          =
      IS_REPREP_ID                      =
      I_SCREEN_START_COLUMN             = 0
      I_SCREEN_START_LINE               = 0
      I_SCREEN_END_COLUMN               = 0
      I_SCREEN_END_LINE                 = 0
      I_HTML_HEIGHT_TOP                 = 0
      I_HTML_HEIGHT_END                 = 0
      IT_ALV_GRAPHICS                   =
      IT_HYPERLINK                      =
      IT_ADD_FIELDCAT                   =
      IT_EXCEPT_QINFO                   =
      IR_SALV_FULLSCREEN_ADAPTER        =
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER           =
      ES_EXIT_CAUSED_BY_USER            =
      TABLES
        T_OUTTAB                          = IT_ITEM
    EXCEPTIONS
      PROGRAM_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.
    ENDFORM.                    " F_GET_DISPLAY3
    *&      Form  F_GET_FCAT3
    FORM F_GET_FCAT3  USING    VALUE(P1)
                               VALUE(P2)
                               VALUE(P3)
                               VALUE(P4)
                               VALUE(P5)
                               VALUE(P6)
                               VALUE(P7)
                               VALUE(P8)
                               VALUE(P9)
                              VALUE(P10).
    CLEAR WA_FCAT3.
      WA_FCAT3-FIELDNAME = P1.
      WA_FCAT3-COL_POS = P2.
      WA_FCAT3-JUST = P3.
      WA_FCAT3-OUTPUTLEN = P4.
      WA_FCAT3-SELTEXT_M  = P5.
      WA_FCAT3-DDICTXT = P6.
      WA_FCAT3-REF_TABNAME = P7.
      WA_FCAT3-HOTSPOT = P8.
      WA_FCAT3-EMPHASIZE = P9.
      WA_FCAT3-DO_SUM  = P10.
      APPEND WA_FCAT3 TO IT_FCAT3.
    ENDFORM.                    " F_GET_FCAT3
    *&      Form  F_BUILD_LAYOUT1
          text
    -->  p1        text
    <--  p2        text
    FORM F_BUILD_LAYOUT1 .
    WA_LAYOUT1-totals_text = 'TOTAL'.
    wa_layout1-detail_popup = 'X'.
    ENDFORM.                    " F_BUILD_LAYO
    *&      Form  F_GET_EVENTS2
          text
         -->P_IT_EVENTS2  text
         <--P_WA_EVENTS2  text
    FORM F_GET_EVENTS2  USING    VALUE(P_WA_EVENTS2) LIKE WA_EVENTS2
                        CHANGING P_IT_EVENTS2 LIKE IT_EVENTS2.
    P_WA_EVENTS2-NAME = 'HTML_TOP_OF_PAGE'.
    P_WA_EVENTS2-FORM = 'F_TOP_OF_PAGE3'.
    APPEND P_WA_EVENTS2 TO P_IT_EVENTS2.
    CLEAR P_WA_EVENTS2.
    P_WA_EVENTS2-NAME = 'PF_STATUS'.
    P_WA_EVENTS2-FORM = 'F_PF_STATUS'.
    APPEND P_WA_EVENTS2 TO P_IT_EVENTS2.
    CLEAR P_WA_EVENTS2.
    P_WA_EVENTS2-NAME = 'USER_COMMAND'.
    P_WA_EVENTS2-FORM = 'F_USER_COMMAND3'.
    APPEND P_WA_EVENTS2 TO P_IT_EVENTS2.
    CLEAR P_WA_EVENTS2.
    p_wa_events2-name = 'HTML_END_OF_LIST'.
    P_WA_EVENTS2-FORM = 'F_HTML_END_OF_LIST'.
    APPEND P_WA_EVENTS2 TO P_IT_EVENTS2.
    CLEAR p_wa_events2.
    ENDFORM.                    " F_GET_EVENTS2
    *&      Form  F_TOP_OF_PAGE3
          text
    -->  p1        text
    <--  p2        text
    FORM F_TOP_OF_PAGE3 USING DOCUMENT TYPE REF TO cl_dd_document .
    data : link_area type ref to cl_dd_area,
           picture_area type ref to cl_dd_area.
    CALL METHOD DOCUMENT->ADD_TEXT
      EXPORTING
        TEXT          = 'ALV REPORT'
       TEXT_TABLE    =
       FIX_LINES     =
       SAP_STYLE     =
        SAP_COLOR     = cl_dd_area=>list_background_int
        SAP_FONTSIZE  = 'LARGE'
        SAP_FONTSTYLE = 'TIMES'
        SAP_EMPHASIS  = 'STRONG'
       STYLE_CLASS   =
    CHANGING
       DOCUMENT      =
    CALL METHOD DOCUMENT->NEW_LINE.
    CALL METHOD DOCUMENT->ADD_PICTURE
      EXPORTING
        PICTURE_ID       = 'LOGO1'
        WIDTH            = '10%'
    ENDFORM.                    " F_TOP_OF_PAGE3
    *&      Form  F_GET_SORT
          text
    -->  p1        text
    <--  p2        text
    FORM F_GET_SORT .
    WA_SORT-FIELDNAME = 'NETWR'.
    WA_SORT-SPOS  = 4.
    WA_SORT-UP = 'X'.
    WA_SORT-SUBTOT = 'X'.
    APPEND WA_SORT TO IT_SORT.
    ENDFORM.                    " F_GET_SORT
    *&      Form  F_PF_STATUS
          text
    -->  p1        text
    <--  p2        text
    FORM F_PF_STATUS USING RS_EXTAB TYPE SLIS_T_EXTAB .
    SET PF-STATUS 'ZHAIALV' EXCLUDING RS_EXTAB.
    ENDFORM.                    " F_PF_STATUS
    *&      Form  F_USER_COMMAND3
          text
    -->  p1        text
    <--  p2        text
    FORM F_USER_COMMAND3 USING R_UCOMM LIKE SY-UCOMM
                               RS_SELFIELD TYPE SLIS_SELFIELD.
    CASE R_UCOMM.
    WHEN '&SALE'.
    IF RS_SELFIELD-FIELDNAME = 'VBELN'.
    SET parameter ID 'AUN' FIELD rs_selfield-value.
    CALL TRANSACTION 'VA02' AND SKIP FIRST SCREEN.
    ENDIF.
    WHEN '&MAT'.
    IF RS_SELFIELD-FIELDNAME = 'MATNR'.
    SET PARAMETER ID 'MAT' FIELD RS_SELFIELD-VALUE.
    CALL TRANSACTION 'MM02' AND SKIP FIRST SCREEN.
    ENDIF.
    ENDCASE.
    ENDFORM.                    " F_USER_COMMAND3
    *&      Form  F_HTML_END_OF_LIST
          text
    -->  p1        text
    <--  p2        text
    FORM F_HTML_END_OF_LIST USING DOCUMENT TYPE REF TO CL_DD_DOCUMENT.
    DATA : PAGE TYPE SDYDO_TEXT_ELEMENT.
    MOVE SY-PAGNO TO PAGE.
    CALL METHOD DOCUMENT->ADD_TEXT
      EXPORTING
        TEXT          = PAGE
       TEXT_TABLE    =
       FIX_LINES     =
       SAP_STYLE     =
       SAP_COLOR     =
       SAP_FONTSIZE  =
       SAP_FONTSTYLE =
       SAP_EMPHASIS  =
       STYLE_CLASS   =
    CHANGING
       DOCUMENT      =
    ENDFORM.                    " F_HTML_END_OF_LIS

  • How to create a  schedule program in java

    Hello Friends ,
    Can any one provide me with an example how to create a schedule program using java.util.timer etc . I am in need of a program which should run as a schedule job that searches for a file in a directory and read the latest files from that directory in every minute of time as a schedule job .
    Thanks
    mahesh

    I don't feel like writing my own example, but google will be happy to provide you with an example.

  • How to create an IDoc programmatically at Inbound side?

    Hi,
    How to create an IDoc programmatically at Inbound side?
    Assume that you have a file(material master details) which is enough to create master data.
    Regards,
    Thiyagu

    Read the documentation of this FM first:
    FU IDOC_INBOUND_ASYNCHRONOUS                                                                               
    K. tekst
                                                                                    IDoc inbound processing via tRFC                                                                               
    Functionality
                                                                                    This function module starts inbound processing in the case of port type    
        "tRFC". The function module is a successor to INBOUND_IDOC_PROCESS,        
        which processes IDocs in the Release 4.0 record types. If you are          
        processing IDocs in Release 3.X record types, the function module          
        INBOUND_IDOC_PROCESS must still be called.                                                                               
    The function module checks the ID 'EDI_MES' in authorization object        
        B_ALE_RECV against the received message type.                                                                               
    The IDocs are saved by the function module IDOC_INBOUND_WRITE_TO_DB (a     
        COMMIT for all IDocs) and then transferred directly to the application     
        by the dispatcher module IDOC_START_INBOUND.                                                                               
    Parameter
                                                                                    IDOC_CONTROL_REC_40                                                        
        IDOC_DATA_REC_40                                                                               
    Exceptions
                                                                                    Functiegroep                                                                               
    Edited by: Micky Oestreich on Jun 11, 2009 12:52 PM

  • How to create multiple Idocs in SAP R3 ?

    I have been asked question on Idocs from MNC company.
    How to create multiple idocs in R3 ? Please let me know.

    hi ,
    if you want to create in multiple IDOCS in XI , take XSD of IDOC and chnage the occurance to 1 to UNBOUNDED, you can genarate multiple IDOCS.
    Regards,
    Raj

  • How to create a IDOC?

    Hi Experts,
    I need to create a Stock TRansfer Order IDOC, the other detaiks are,
    IDOC type: WMTc1D01
    Message type: WMTOCO
    Partner profile: Ship To Acct #
    so, request u that, let me know How to create this IDOC, step by step, if time permits!
    thanq

    Hi Srinivas,
        Go through the following documents.
    Link:[http://lmy52.wordpress.com/2006/06/15/how-to-create-idoc]
    Link:[http://books.google.co.in/books?id=iXfURjhThDYC&pg=PA62&lpg=PA62&dq=createanIDOC&source=web&ots=nVyBnVmhKT&sig=PBiAMxaRUK3cem1v5dIUKz8Rkhc&hl=en&sa=X&oi=book_result&resnum=10&ct=result]
    Link:[https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d19fe210-0d01-0010-4094-a6fba344e098]
    If they useful, reward points.
    Thank you,
    Prasad G.V.K

  • Regarding how to create custom IDOC?

    hi experts:
           thank you all in advance for all your answers . .
           I am studying Idoc, Would you please give me an example about how to create custom IDOC , and the basic idea, what's more , give me some material I can refer to . couldn't thank you more
           Best regards
           Frank

    Steps To Create Custom IDOC
    1.Create Segment Type (WE31)
    Go to Transaction code WE31
    Enter Segment type, click on Create
    Give Description
    Enter the Necessary Fields & Data Elements for those Fields.
    Save the Changes.
    2.Create Idoc Type (WE30)
    Go to transaction code WE30
    Enter the Object Name, select Basic type and click Create icon
    Select the create new option and enter a description for your basic IDOC type and press enter
    Select the IDOC Name and click Create icon
    The system prompts us to enter a segment type and its attributes
    Choose the appropriate values and press Enter
    The system transfers the name of the segment type to the IDOC editor.
    Follow these steps to add more number of segments to Parent or as Parent-child relation
    Save it and go back
    Go to Edit -> Set release
    3.Create Message Type (WE81)
    Go to transaction code WE81
    Change the details from Display mode to Change modenAfter selection, the system will give this message “The table is cross-client (see Help for further info)”. Press EnternClick New Entries to create new Message Type
    Fill details
    Save it and go back
    4.Assign Idoc Type to Message Type (WE82)
    Go to transaction code WE82
    Change the details from Display mode to Change moden After selection, the system will give this message “The table is cross-client (see Help for further info)”. Press Enter.
    Click New Entries to create new Message Type.
    Fill details
    Save it and go back
    You will get step by step process.
    ABAP Development
    http://www.sapgenie.com/sapedi/idoc_abap.htm
    http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
    http://www.allsaplinks.com/idoc_sample.html
    http://www.geocities.com/xplosion78/customised_ALE_IDOC_BY_SACHIN_DABHADE.zip
    http://help.sap.com/saphelp_45b/helpdata/en/35/b0ea5187a62488e10000009b38f9b7/content.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/c4/6bc368fef411d28d0900104b56737d/frameset.htm
    ABAP Development
    Follow below steps to create custom IDOC.
    1.Create segments through transaction WE31.
    2.Create IDoc Type through transaction WE30 by attaching created segments.
    3.Message type through transaction WE81.
    4.Link Idoc and message type in WE82 transaction.
    Check the transaction WEDI for ALE settings
    Check these links for more details on IDoc's:
    ALE/ IDOC
    http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
    http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
    http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
    http://www.sapgenie.com/sapedi/index.htm
    http://www.sappoint.com/abap/ale.pdf
    http://www.sappoint.com/abap/ale2.pdf
    http://www.sapgenie.com/sapedi/idoc_abap.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a60bb507d11d18ee90000e8366fc2/frameset.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/78/217da751ce11d189570000e829fbbd/frameset.htm
    http://www.allsaplinks.com/idoc_sample.html
    http://www.sappoint.com/abap.html
    http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
    http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
    http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
    http://www.sapgenie.com/sapedi/index.htm
    http://www.allsaplinks.com/idoc_sample.html
    ALE/ IDOC/ XML
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
    http://www.thespot4sap.com/Articles/SAP_XML_Business_Integration.asp
    http://help.sap.com/saphelp_srm30/helpdata/en/72/0fe1385bed2815e10000000a114084/content.htm
    IDOC Convertion
    /people/kevin.wilson2/blog/2005/12/07/changing-fields-in-an-idoc-segment
    http://www.intelligententerprise.com/channels/applications/feature/archive/kasturi.jhtml
    i need a sample code regarding to create a custom IDOC...
    Reward points...

  • How to create Inbound Idocs in a ABAP program? Any function Module?

    Hello Experts,
    My requirement is : I have sales order data which I extracted from third party system in my internal tables. In the same box I need to create inbound Idocs and then consequently create sales orders.
    I have used the function module IDOC_INBOUND_WRITE_TO_DB to create inbound Idocs from Sales Orders data in internal tables. I have populated all the data records with correct PSGNUM and HLEVEL values. My plan is to create inbound idocs with this function module and send those to IDOC_INPUT_ORDERS function module which creates Sales Orders.
    If a sales order in the internal table in ABAP program contains only one item, then I am getting correct idocs. But if more than one item exists for a sales order then the line item segments which got repeated in Idoc are having PSGNUM and HLEVEL values as zero when I checked in WE02. As a result the hierarchy from the second item segment is getting disturbed and getting the status 60.
    I populated T_EDIDD with data records from  IDOC_INBOUND_WRITE_TO_DB.
    To the function module IDOC_INPUT_ORDERS,  T_EDIDC and T_EDIDD are the input. I observed that in T_EDIDD also the PSGNUM and HLEVEL values are blank.
    I am getting Status 60 with message 'EDI: Syntax error in IDoc (segment cannot be identified)' for idocs which have more than one item.
    I need to extract sales data from third party and create inbound idocs and create sales orders in one ABAP program only. I need to display corresponding Idoc numbers for the corresponding third party sales order number in a listoutput.
    Can anybody please provide inputs?
    Regards.

    Hi Anjali,
    Thanks for the response.
    I have passed the PSGNUM and HLEVEL values while populating the data records. Then I sent the data records and control record information to the function module IDOC_INBOUND_WRITE_TO_DB. Inside this function module there is code to clear the PSGNUM values and HLEVEL values.
    for compatibility: clear administration data of data records
               perform data_records_wipe
                                      tables
                                          t_data_records.
    FORM DATA_RECORDS_WIPE
                      TABLES
                          T_DATA_RECORDS_IN  STRUCTURE EDIDD.
      LOOP AT  T_DATA_RECORDS_IN.
        CLEAR: T_DATA_RECORDS_IN-MANDT,
               T_DATA_RECORDS_IN-DOCNUM,
               T_DATA_RECORDS_IN-SEGNUM,
               T_DATA_RECORDS_IN-PSGNUM,
               T_DATA_RECORDS_IN-HLEVEL.
        modify t_data_records_in.
      ENDLOOP.
    ENDFORM.                               " DATA_RECORDS_WIPE
    This is the code which is clearing all the PSGNUM and HLEVEL values. After coming out of this function module we are getting the error idocs created with disturbed hierarchy.
    I need to create INBOUND Idocs with the data in ABAP program.
    Please let me know if any inputs? Is there any function module existing to create Inbound Idocs inside an ABAP program?
    Regards

  • How to create an idoc layout file *.ido

    Hello,
    I'm want to create an IDOC layout file (*.ido) from a specific idoc (ORDERS05 or another).
    How can i do that.
    Thanks and regards

    It's not the solution. I want an description of the layout of an idoc in a specific format. In this case an *.ido format. I have an conversion program (TIE portal) where i have to import it for interfacing.

  • How to create inbound idoc and FM

    Dear All,
    How to create custom inbound idoc, the program and FM.
    Can anyone send me step by step process to create it, steps in FM and Coding.
    I have created for outbound and its working fine.
    Plz reply ASAP.
    Regards,
    Arun.

    Hi Arun,
    1) Create segment (WE31)
    2) Create IDOC Types (WE30)
    3) Create message type (WE81)
    4) Link message type with basic type (WE82)
    5) Create FM (SE37)
         here in the source code part of the function module you have to loop into the data records table of the idoc. then loop into the status recod table  to update the status of the idoc(Posted/Postedwitherrors/errors).
    6) Create Process Code (Inbound - WE41/ Outbound - WE42)
    7) Link FM and process code (WE57)
    go to WE19 to test it.
    Edited by: Chinna guntur on Sep 2, 2008 9:17 AM

  • How to create an IDoc just with the updated data.

    Hello I have a question regarding IDocs.
    In case I updated an existing material.
    Is there a transaction where I can put a matnr in, that reads the change pointer table and creates an IDOC with just the updated fields for an existing material.
    Like the transaction BD21, for example. But there I just have the possibility to enter a message type and not a material number.
    If there is no standard transaction. What steps do I have to do to achieve this goal?
    Kind regards,
    Tobias

    thanks a lot for your fast answers. but I want to decide weather I want to create a idoc that includes all data for a material (using transaction bd10) or create an idoc that includes just the updated data.
    The program logic should be the following:
    Select all materials in the change pointer table (that have been changed or new created).
    Check what value has been changed.
    If it is value YSAPSYSTEMXX (extension of mara) then create a idoc with all data for the material.
    If not YSAPSYSTEMXX has been changed create an idoc that includes just the updated data.
    For Idocs that include all material data I would use sap standard transaction BD10 and batch-input.
    For Idoc that should only include the changed/updated data I am searching for a corresponding transaction….
    Kind regards,
    Tobias

  • How to CREATE an IDOC of name WMTC1D01 for Transfer Orders-STOs??

    Hi Experts,
    I need to  CREATE a IDOC-WMTC1D01 for Stock Transfer Orders-STOs and must execute it.
    So, in this regard, request u that, let me know that,
    1  - How I can CREATE the IDOC-WMTC1D01 for STOs?
    2 - Then, after creating it, How to execute it?
    thanq

    no reply

  • How to create an IDOC Status.

    Hi All,
    I have a requirement to create an IDOC Status, which should be a copy of existing status.
    How to accomplish the same.
    Regards,
    Neha

    Hi Neha,
    You can create the Idoc status, if it is an Inbound Idoc. Copy the Existing process code & add it to u r Inbound Partner Profile. In the process code u can create the status..Check the below code.
    if gv_error_status <> 0.
            condense gt_msgv-msgv1 no-gaps.
            translate gt_msgv-msgv1 to upper case.  "#EC TRANSLANG
            set extended check on.
            read table idoc_contrl index 1.
            idoc_status-status = '68'.
            idoc_status-uname  = sy-uname.
            idoc_status-repid  = sy-repid.
            idoc_status-routid = gv_funcname.
            idoc_status-docnum = idoc_contrl-docnum.
            idoc_status-msgv1 = gt_msgv-msgv1.
            idoc_status-msgv2 = gt_msgv-msgv2.
            append idoc_status.
            idoc_status-status = '51'.
            idoc_status-uname  = sy-uname.
            idoc_status-repid  = sy-repid.
            idoc_status-routid = gv_funcname.
            idoc_status-docnum = idoc_contrl-docnum.
            append idoc_status.
    endif.
    I hope this help you.
    Regards
    Rajendra

  • How to create an idoc when the credit memo is generated!

    My requirement is "An idoc will be generated when the credit memo is created "
    What is the possible way to that.
    Please send me steps (with screen shots if possible)
    thnks

    Re: How to create a credit memo !
    Reward point..

Maybe you are looking for