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

Similar Messages

  • How to create multiple idocs based on complex condition

    HI Users,
    my scenario is jms(xml file) to idoc. for each file have multiple records for each record i need to create multiple idocs.
    source structure:
    <lineitem>
    <student sid="cid">456</student>
    <hreference>
    <reference rtype="number">123</reference>
    </hreference>
    <hreference>
    <reference rtype="number">789</reference>
    </hreference>
    <hreference>
    <reference rtype="char">147</reference>
    </hreference>
    now condition is One input message must create only one output message for each unique  rtype="number" and sid="cid" combination.
    for example
    1. rtype="number" and sid="cid" the value combination means 123456 for this one idoc
    2.  rtype="number" and sid="cid" the value combination means 789456 for this one idoc
    --> the below file shows with out sid="cid"
    <lineitem>
    <student sid="abc">456</student>
    <hreference>
    <reference rtype="number">123</reference>
    </hreference>
    <hreference>
    <reference rtype="number">789</reference>
    </hreference>
    <hreference>
    <reference rtype="number">147</reference>
    </hreference>
    in this case we have to consider only rtype="number" so here we need to create  3 idocs.
    Could anyone help me in this regard.
    Thanks in advance

    Hi Swathip,
    Change the occurence of the IDoc to "unbounded", so that multiple IDocs can get create
    Try with below logic
    If (SID = "CID")
    Then
         If(rtype = "number")
              concat(student,reference ) ---> removeContext ---> Idoc          
    Else
         rtype ---> removeContext ---> Idoc
    If combination of unique  student and reference can occur more than once in the XML, use sort command and splitByValue (Value Change)
    Edited by: chandra shekhar on Jul 3, 2011 12:53 PM

  • How to create multiple segments on the target structure of an IDOC

    Hi All
       I am working on the Shipment Confirmation Interface( Message Type SHPCON ) which is FILE to IDOC Scenario. I have a segment called E1EDL18 which occurs only once on the target side of the idoc. Now I have to created multiple E1EDl18 segments for the Qualifiers ORI, PGI and PCK. I treid to send a constant ORI,PGI,PCK and then used an user defined function which splits the constant at COMMA and then I am assigning to the target field QUALF. In the display queue for QUALF I see three values with context but still only one E1EDL!* segment is created. Please let me know how to create multiple E1EDl18 segments for three qualifiers.
    Thanks
    Naga

    In message Mapping, just right click on the segment and click on duplicate subtree. now it will create you another segment with same name and fields in it..
    you can hard code the Qual, or you can map the required source field into it.

  • How to store multiple files from SAp in to Application server?

    Hi Guys,
                 Can anybody tell me how to store multiple files from SAP into Application server.in my application i have to get the data from SAP tables BSEG , BKPF , BSAK and BSIK that to daily i have to do.
                Any Logic  or Code for how to do is welcomed.
                        plz help me urgently.
    Thanks,
    Gopi

    Hi,
      directories creates basis. If you have task to store data in application server you already should have information into which folder you have to do it. If you don't have this information because it is just for example training for next task then you can use your personal folder into which you have access. To get list of all available folders please look at attached code and form get_directories (you get the list of folders you see in transaction AL11). But don't forget: If you are using open dataset you have to have rights to access application folder!
    Here you are code which I use to upload text files from local disc into application folder
    Regards,
      Karol
    *& Report  FILE_PC_TO_SAP
    REPORT  FILE_PC_TO_SAP.
    DATA: BEGIN OF searchpoints OCCURS 100,
            DIRNAME(200)     TYPE c, " name of directory.
            sp_name(100)     TYPE c," name of entry. (may end with *)
          END OF searchpoints.
    DATA: BEGIN OF isearchpoints OCCURS 10,
            dirname(75) TYPE c,            " name of directory.
            aliass(75)  TYPE c,            " alias for directory.
            svrname(75) TYPE c,            " svr where directory is availabl
            sp_name(75) TYPE c,            " name of entry. (may end with *)
            sp_cs(10)   TYPE c,            " ContainsString pattern for name
          END OF isearchpoints.
    data: l_file type filetable.
    data: l_rc   type i.
    data: itab   type TABLE OF string.
    data: g_tmp_file_path type rlgrap-filename.
    data: wa_itab type string.
    data: h_destin(100) type c.
    data: dat      type string.
    INITIALIZATION.
    perform get_directories.
    START-OF-SELECTION.
    parameters: in_file type string OBLIGATORY LOWER CASE.
    parameters: destin(100) type c OBLIGATORY LOWER CASE.
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
       FILENAME                      = in_file
       "FILETYPE                      = 'BIN'
       FILETYPE                      = 'ASC'
       HAS_FIELD_SEPARATOR           = ' '
       HEADER_LENGTH                 = 0
       READ_BY_LINE                  = 'X'
       DAT_MODE                      = ' '
      TABLES
        DATA_TAB                     = itab
    EXCEPTIONS
       FILE_OPEN_ERROR               = 1
       FILE_READ_ERROR               = 2
       NO_BATCH                      = 3
       GUI_REFUSE_FILETRANSFER       = 4
       INVALID_TYPE                  = 5
       NO_AUTHORITY                  = 6
       UNKNOWN_ERROR                 = 7
       BAD_DATA_FORMAT               = 8
       HEADER_NOT_ALLOWED            = 9
       SEPARATOR_NOT_ALLOWED         = 10
       HEADER_TOO_LONG               = 11
       UNKNOWN_DP_ERROR              = 12
       ACCESS_DENIED                 = 13
       DP_OUT_OF_MEMORY              = 14
       DISK_FULL                     = 15
       DP_TIMEOUT                    = 16
       OTHERS                        = 17.
    IF sy-SUBRC <> 0.
      write: / 'Error during loading input file!'.
    ENDIF.
    if h_destin is INITIAL.
      h_destin = in_file.
    endif.
    CONCATENATE destin h_destin into dat SEPARATED BY '/'.
    *TRANSLATE dat TO UPPER CASE.
    OPEN DATASET dat FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
    IF sy-SUBRC = 0.
      loop at itab into wa_itab.
         TRANSFER: wa_itab TO dat.
      endloop.
      CLOSE DATASET dat.
      write: / 'File uploaded!'.
    ELSE.
      write: / 'Not possible to open dataset'.
    ENDIF.
    at selection-screen on value-request for in_file.
      perform select_input_file_name.
      loop at l_file into g_tmp_file_path.
        move g_tmp_file_path to in_file.
        h_destin = ''.
        SPLIT g_tmp_file_path at '\' into table itab.
        loop at itab into g_tmp_file_path.
          h_destin = g_tmp_file_path.
        endloop.
      endloop.
    at selection-screen on value-request for destin.
      DATA: lt_dfies    TYPE TABLE OF dfies.
      DATA: lwa_dfies   TYPE dfies.
      CALL FUNCTION 'DDIF_FIELDINFO_GET'
        EXPORTING
          tabname    = '/BI0/PCO_AREA'
          lfieldname = 'CO_AREA'
        IMPORTING
          dfies_wa   = lwa_dfies.
      lwa_dfies-tabname = 'searchpoints'.
      lwa_dfies-REPTEXT   = 'Destination directory'.
      lwa_dfies-LENG      = 100.
      lwa_dfies-INTLEN    = 100.
      lwa_dfies-OUTPUTLEN = 100.
      lwa_dfies-fieldname = 'SP_NAME'.
      APPEND lwa_dfies TO lt_dfies.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          RETFIELD = 'SP_NAME'
          DYNPPROG = SY-REPID
          DYNPNR = SY-DYNNR
          DYNPROFIELD = 'destin'
          VALUE_ORG = 'S'
        TABLES
          VALUE_TAB = searchpoints
          FIELD_TAB = lt_dfies
        EXCEPTIONS
          PARAMETER_ERROR = 1
          NO_VALUES_FOUND = 2
          OTHERS = 3.
    *&      Form  select_input_file_name
    *       text
    form select_input_file_name.
    *  call function 'F4_FILENAME'
    *       exporting
    *            program_name  = sy-repid
    *            dynpro_number = sy-dynnr
    *            field_name    = 'PATH'
    *       importing
    *            file_name     = g_tmp_file_path.
      CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_OPEN_DIALOG
      EXPORTING
      WINDOW_TITLE = 'Please choose a file'
      "default_extension = '*.TXT'
      "default_filename = 'C:\*.txt'
      initial_directory = 'C:\'
      file_filter = '*.*'
      CHANGING
      FILE_TABLE = l_file
      RC = l_RC
      EXCEPTIONS
      FILE_OPEN_DIALOG_FAILED = 1
      CNTL_ERROR = 2
      ERROR_NO_GUI = 3
      NOT_SUPPORTED_BY_GUI = 4
      OTHERS = 5.
      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.                    "select_input_file_name
    *&      Form  WRITE_DB_HOME
    *       Write DB home directory
    *       no parameters
    FORM write_db_home.
      CASE sy-dbsys(3).
        WHEN 'ORA'.
          CALL 'C_SAPGPARAM' ID 'NAME'  FIELD 'DIR_ORAHOME'
                             ID 'VALUE' FIELD searchpoints-dirname.
    *--- C5056155 Start of ALV -------------------------------*
    *      PERFORM flip_flop(rsora000) USING cflag.
    *      WRITE: / 'DIR_ORAHOME',       30 searchpoints-dirname.
          MOVE: 'DIR_ORAHOME'        TO searchpoints-sp_name.
          APPEND searchpoints.
    *--- C5056155 End   of ALV -------------------------------*
        WHEN 'ADA'.
          CALL 'C_GETENV' ID 'NAME'  FIELD 'DBROOT'
                          ID 'VALUE' FIELD searchpoints-dirname.
    *--- C5056155 Start of ALV -------------------------------*
    *      PERFORM flip_flop(rsora000) USING cflag.
    *      WRITE: / 'DIR_ADA_DBROOT',    30 searchpoints-dirname.
          MOVE: 'DIR_ADA_DBROOT'     TO searchpoints-sp_name.
          APPEND searchpoints.
    *--- C5056155 End   of ALV -------------------------------*
        WHEN 'INF'.
          CALL 'C_GETENV' ID 'NAME'  FIELD 'INFORMIXDIR'
                          ID 'VALUE' FIELD searchpoints-dirname.
    *--- C5056155 Start of ALV -------------------------------*
    *      PERFORM flip_flop(rsora000) USING cflag.
    *      WRITE: / 'DIR_INF_INFORMIXDIR', 30 searchpoints-dirname.
          MOVE: 'DIR_INF_INFORMIXDIR' TO searchpoints-sp_name.
          APPEND searchpoints..
    *--- C5056155 End   of ALV -------------------------------*
        WHEN 'DB6'.
          CALL 'C_GETENV' ID 'NAME'  FIELD 'INSTHOME'
                          ID 'VALUE' FIELD searchpoints-dirname.
          IF sy-subrc = 0.
    *--- C5056155 Start of ALV -------------------------------*
    *        PERFORM flip_flop(rsora000) USING cflag.
    *        WRITE: / 'DIR_DB2_HOME',    30 searchpoints-dirname.
            MOVE: 'DIR_DB2_HOME'       TO searchpoints-sp_name.
            APPEND searchpoints.
    *--- C5056155 End   of ALV -------------------------------*
          ELSE.
            EXIT.
          ENDIF.
        WHEN OTHERS.
          EXIT.
      ENDCASE.
    ENDFORM.                    " WRITE_DB_HOME
    FORM get_directories.
    * get the name and aliases of ALL userdefined directories
      SELECT * FROM user_dir INTO isearchpoints
        WHERE svrname = sy-uname.
        MOVE isearchpoints-dirname to searchpoints-dirname.
        MOVE isearchpoints-aliass  to searchpoints-sp_name.
        APPEND searchpoints.
      ENDSELECT.
      SELECT * FROM user_dir INTO isearchpoints
        WHERE svrname = 'all'.
        MOVE isearchpoints-dirname to searchpoints-dirname.
        MOVE isearchpoints-aliass  to searchpoints-sp_name.
        APPEND searchpoints.
      ENDSELECT.
    * Get DB home
      IF sy-dbsys(3) = 'ADA'.
        PERFORM write_db_home.
      ENDIF.
    * get name of directory with the error files
      CALL 'C_SAPGPARAM' ID 'NAME'  FIELD 'DIR_ATRA'
                         ID 'VALUE' FIELD searchpoints-dirname.
      MOVE: 'DIR_ATRA'           TO searchpoints-sp_name.
      APPEND searchpoints.
    * get name of directory with the error files
      CALL 'C_SAPGPARAM' ID 'NAME'  FIELD 'DIR_BINARY'
                         ID 'VALUE' FIELD searchpoints-dirname.
      MOVE: 'DIR_BINARY'         TO searchpoints-sp_name.
      APPEND searchpoints.
    * get name of directory $DIR_CCMS
      CALL 'C_SAPGPARAM' ID 'NAME'  FIELD 'DIR_CCMS'
                         ID 'VALUE' FIELD searchpoints-dirname.
      MOVE: 'DIR_CCMS'           TO searchpoints-sp_name.
      APPEND searchpoints.
    * get name of directory with the error files
      CALL 'C_SAPGPARAM' ID 'NAME'  FIELD 'DIR_CT_LOGGING'
                         ID 'VALUE' FIELD searchpoints-dirname.
      MOVE: 'DIR_CT_LOGGING'     TO searchpoints-sp_name.
      APPEND searchpoints.
    * get name of directory with the error files
      CALL 'C_SAPGPARAM' ID 'NAME'  FIELD 'DIR_CT_RUN'
                         ID 'VALUE' FIELD searchpoints-dirname.
      MOVE: 'DIR_CT_RUN'         TO searchpoints-sp_name.
      APPEND searchpoints.
    * get name of directory with the error files
      CALL 'C_SAPGPARAM' ID 'NAME'  FIELD 'DIR_DATA'
                         ID 'VALUE' FIELD searchpoints-dirname.
      MOVE: 'DIR_DATA'           TO searchpoints-sp_name.
      APPEND searchpoints.
    * Get DB home
      IF sy-dbsys(3) = 'DB6'.
        PERFORM write_db_home.
      ENDIF.
    * get name of directory with the error files
      CALL 'C_SAPGPARAM' ID 'NAME'  FIELD 'DIR_DBMS'
                         ID 'VALUE' FIELD searchpoints-dirname.
      MOVE: 'DIR_DBMS'           TO searchpoints-sp_name.
      APPEND searchpoints.
    * get name of directory with the error files
      CALL 'C_SAPGPARAM' ID 'NAME'  FIELD 'DIR_EXECUTABLE'
                         ID 'VALUE' FIELD searchpoints-dirname.
      MOVE: 'DIR_EXECUTABLE'     TO searchpoints-sp_name.
      APPEND searchpoints.
    * get name of directory with the error files
      CALL 'C_SAPGPARAM' ID 'NAME'  FIELD 'DIR_EXE_ROOT'
                         ID 'VALUE' FIELD searchpoints-dirname.
      MOVE: 'DIR_EXE_ROOT'       TO searchpoints-sp_name.
      APPEND searchpoints.
    *get name of directory with the error files
      CALL 'C_SAPGPARAM' ID 'NAME'  FIELD 'DIR_GEN'
                         ID 'VALUE' FIELD searchpoints-dirname.
      MOVE: 'DIR_GEN'            TO searchpoints-sp_name.
      APPEND searchpoints.
    * get name of directory with the error files
      CALL 'C_SAPGPARAM' ID 'NAME'  FIELD 'DIR_GEN_ROOT'
                         ID 'VALUE' FIELD searchpoints-dirname.
      MOVE: 'DIR_GEN_ROOT'       TO searchpoints-sp_name.
      APPEND searchpoints.
    * get name of directory with the error files
      CALL 'C_SAPGPARAM' ID 'NAME'  FIELD 'DIR_GLOBAL'
                         ID 'VALUE' FIELD searchpoints-dirname.
      MOVE: 'DIR_GLOBAL'         TO searchpoints-sp_name.
      APPEND searchpoints.
      CALL 'C_SAPGPARAM' ID 'NAME'  FIELD 'DIR_GRAPH_EXE'
                         ID 'VALUE' FIELD searchpoints-dirname.
      MOVE: 'DIR_GRAPH_EXE'      TO searchpoints-sp_name.
      APPEND searchpoints.
    * get name of directory with the error files
      CALL 'C_SAPGPARAM' ID 'NAME'  FIELD 'DIR_GRAPH_LIB'
                         ID 'VALUE' FIELD searchpoints-dirname.
      MOVE: 'DIR_GRAPH_LIB'      TO searchpoints-sp_name.
      APPEND searchpoints.
    * get name of directory with the error files
      CALL 'C_SAPGPARAM' ID 'NAME'  FIELD 'DIR_HOME'
                         ID 'VALUE' FIELD searchpoints-dirname.
      MOVE: 'DIR_HOME'           TO searchpoints-sp_name.
      APPEND searchpoints.
    * Get DB home
      IF sy-dbsys(3) = 'INF'.
        PERFORM write_db_home.
      ENDIF.
    * get name of directory with the error files
      CALL 'C_SAPGPARAM' ID 'NAME'  FIELD 'DIR_INSTALL'
                         ID 'VALUE' FIELD searchpoints-dirname.
      MOVE: 'DIR_INSTALL'        TO searchpoints-sp_name.
      APPEND searchpoints.
    * get name of directory with the error files
      CALL 'C_SAPGPARAM' ID 'NAME'  FIELD 'DIR_INSTANCE'
                         ID 'VALUE' FIELD searchpoints-dirname.
      MOVE: 'DIR_INSTANCE'       TO searchpoints-sp_name.
      APPEND searchpoints.
    * get name of directory with the error files
      CALL 'C_SAPGPARAM' ID 'NAME'  FIELD 'DIR_LIBRARY'
                         ID 'VALUE' FIELD searchpoints-dirname.
      MOVE: 'DIR_LIBRARY'        TO searchpoints-sp_name.
      APPEND searchpoints.
    * get name of directory with the error files
      CALL 'C_SAPGPARAM' ID 'NAME'  FIELD 'DIR_LOGGING'
                         ID 'VALUE' FIELD searchpoints-dirname.
      MOVE: 'DIR_LOGGING'        TO searchpoints-sp_name.
      APPEND searchpoints.
    * get name of directory with the files written by the memory inspector
      CALL 'C_SAPGPARAM' ID 'NAME'  FIELD 'DIR_MEMORY_INSPECTOR'
                         ID 'VALUE' FIELD searchpoints-dirname.
      MOVE: 'DIR_MEMORY_INSPECTOR' TO searchpoints-sp_name.
      APPEND searchpoints.
    * Get DB home
      IF sy-dbsys(3) = 'ORA'.
        PERFORM write_db_home.
      ENDIF.
    *get name of directory with the error files
      CALL 'C_SAPGPARAM' ID 'NAME'  FIELD 'DIR_PAGING'
                         ID 'VALUE' FIELD searchpoints-dirname.
      MOVE: 'DIR_PAGING'         TO searchpoints-sp_name.
      APPEND searchpoints.
    *get name of directory with the error files
      CALL 'C_SAPGPARAM' ID 'NAME'  FIELD 'DIR_PUT'
                         ID 'VALUE' FIELD searchpoints-dirname.
      MOVE: 'DIR_PUT'            TO searchpoints-sp_name.
      APPEND searchpoints.
    * get name of directory with the error files
      CALL 'C_SAPGPARAM' ID 'NAME'  FIELD 'DIR_PERF'
                         ID 'VALUE' FIELD searchpoints-dirname.
      MOVE: 'DIR_PERF'           TO searchpoints-sp_name.
      APPEND searchpoints.
      CALL 'C_SAPGPARAM' ID 'NAME'  FIELD 'DIR_PROFILE'
                         ID 'VALUE' FIELD searchpoints-dirname.
      MOVE: 'DIR_PROFILE'        TO searchpoints-sp_name.
      APPEND searchpoints.
    * get name of directory with the error files
      CALL 'C_SAPGPARAM' ID 'NAME'  FIELD 'DIR_PROTOKOLLS'
                         ID 'VALUE' FIELD searchpoints-dirname.
      MOVE: 'DIR_PROTOKOLLS'     TO searchpoints-sp_name.
      APPEND searchpoints.
    * get name of directory with the error files
      CALL 'C_SAPGPARAM' ID 'NAME'  FIELD 'DIR_REORG'
                         ID 'VALUE' FIELD searchpoints-dirname.
      MOVE: 'DIR_REORG'          TO searchpoints-sp_name.
      APPEND searchpoints.
    * get name of directory with the error files
      CALL 'C_SAPGPARAM' ID 'NAME'  FIELD 'DIR_ROLL'
                         ID 'VALUE' FIELD searchpoints-dirname.
      MOVE: 'DIR_ROLL'           TO searchpoints-sp_name.
      APPEND searchpoints.
    * get name of directory with the error files
      CALL 'C_SAPGPARAM' ID 'NAME'  FIELD 'DIR_RSYN'
                         ID 'VALUE' FIELD searchpoints-dirname.
      MOVE: 'DIR_RSYN'           TO searchpoints-sp_name.
      APPEND searchpoints.
    * calculate directory for saphostagent (no sapparam available...)
      IF ( sy-opsys(3) = 'WIN' ) OR ( sy-opsys(3) = 'Win' ).
        DATA: windir_path(64),  programfiles_path(64).
    *   hoping that ProgramFiles is set in service user environment
        CALL 'C_GETENV' ID 'NAME'  FIELD 'ProgramFiles'
                        ID 'VALUE' FIELD programfiles_path.
        IF programfiles_path IS INITIAL.
    *     %ProgramFiles% not available. guess from windir
          CALL 'C_GETENV' ID 'NAME'  FIELD 'windir'
                          ID 'VALUE' FIELD windir_path.
    *     e.g. S:\WINDOWS ==> S:\Program Files
          CONCATENATE windir_path(3) 'Program Files' INTO programfiles_path.
        ENDIF.
        CONCATENATE programfiles_path '\SAP\hostctrl'
                                                 INTO searchpoints-dirname.
      ELSE.
    *   on UNIX, the path is hard coded
        searchpoints-dirname = '/usr/sap/hostctrl'.
      ENDIF.
      MOVE: 'DIR_SAPHOSTAGENT' TO searchpoints-sp_name.
      APPEND searchpoints.
    * get name of directory with the error files
      CALL 'C_SAPGPARAM' ID 'NAME'  FIELD 'DIR_SAPUSERS'
                         ID 'VALUE' FIELD searchpoints-dirname.
      IF searchpoints-dirname = '.'.
        IF sy-opsys = 'Windows NT'.
          searchpoints-dirname = '.\'.
        ELSE.
          searchpoints-dirname = './'.
        ENDIF.
      ENDIF.
      MOVE: 'DIR_SAPUSERS'       TO searchpoints-sp_name.
      APPEND searchpoints.
    * get name of directory with the error files
      CALL 'C_SAPGPARAM' ID 'NAME'  FIELD 'DIR_SETUPS'
                         ID 'VALUE' FIELD searchpoints-dirname.
      MOVE: 'DIR_SETUPS'         TO searchpoints-sp_name.
      APPEND searchpoints.
    * get name of directory with the error files
      CALL 'C_SAPGPARAM' ID 'NAME'  FIELD 'DIR_SORTTMP'
                         ID 'VALUE' FIELD searchpoints-dirname.
      MOVE: 'DIR_SORTTMP'        TO searchpoints-sp_name.
      APPEND searchpoints.
    *get name of directory with the error files
      CALL 'C_SAPGPARAM' ID 'NAME'  FIELD 'DIR_SOURCE'
                         ID 'VALUE' FIELD searchpoints-dirname.
      MOVE: 'DIR_SOURCE'         TO searchpoints-sp_name.
      APPEND searchpoints.
    * get name of directory with the error files
      CALL 'C_SAPGPARAM' ID 'NAME'  FIELD 'DIR_TEMP'
                         ID 'VALUE' FIELD searchpoints-dirname.
      MOVE: 'DIR_TEMP'           TO searchpoints-sp_name.
      APPEND searchpoints.
    * get name of directory with the error files
      CALL 'C_SAPGPARAM' ID 'NAME'  FIELD 'DIR_TRANS'
                         ID 'VALUE' FIELD searchpoints-dirname.
      MOVE: 'DIR_TRANS'          TO searchpoints-sp_name.
      APPEND searchpoints.
      CALL 'C_SAPGPARAM' ID 'NAME'  FIELD 'DIR_TRFILES'
                         ID 'VALUE' FIELD searchpoints-dirname.
      MOVE: 'DIR_TRFILES'        TO searchpoints-sp_name.
      APPEND searchpoints.
    * get name of directory with the error files
      CALL 'C_SAPGPARAM' ID 'NAME'  FIELD 'DIR_TRSUB'
                         ID 'VALUE' FIELD searchpoints-dirname.
      MOVE: 'DIR_TRSUB'          TO searchpoints-sp_name.
      APPEND searchpoints.
    *  get the name of the current server.
      CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'rdisp/myname'
                         ID 'VALUE' FIELD searchpoints-dirname.
      data: h_ind type i.
      LOOP AT searchpoints.
        h_ind = sy-tabix.
        IF searchpoints-sp_name IS INITIAL.
          DELETE searchpoints INDEX h_ind.
        ENDIF.
      ENDLOOP.
    ENDFORM.

  • How to Trigger an IDOC from SAP R/3 to two systems at a time

    Hi experts,
    Can any one please tell me How to Trigger an IDOC from SAP R/3 to two XI systems at a time.
    My current production R/3 system sends a DELVRY03 IDOC to Production XI system ( Name : XIP) .
    I would like to route the same IDOC from production R/3 system to my Quality XI System ( Name XIQ) .
    Problem is production R/3 system triggers an IDOC once. We need to write a logic to route the same to two different systems
    Can any one tell me how can we do that ?
    Regards
    Ram.

    Hello Ram,
    Do you have connectivity between your production & XIQ?
    What does "connectivity" mean?
    1. RFC destination is maintained.
    2. Port defined for the RFC destination.
    If no, create these. (Search in SDN for details).
    If yes, proceed:
    1. Define the logical system for XIQ.(BD54)
    2. Define the same as your partner profile. (WE20). Add the message type SYNCH with the port for XIQ.(This is imp)
    3. Create a distribution model view with sender as "your production" & receiver as XIQ.
    3.1. Add the messages which you want to distribute.
    3.2 Generate Partner profiles.
    No coding is reqd. for this.
    BR,
    Suhas

  • 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

  • Create multiple idoc with multiple receivers based on value mapping table

    Hi,
    Scenario: 
    Step1 : sender sends a finance doc iin the form of an idoc. This idoc will have multiple line items based on profit center. Do determine the value of receiving comp code(header field) n receiving system(logical sys name) value mapping table has to be used.
    Solution so far: I can put an rfc lookup for fetching receiving comp code from mapping table with i/p paraameter as profit center . And split the incoming idoc based on comp code value by using split by value. Now I need your advise 2 take this further.
    Issue 1 : say the incoming idoc has 4  line seg wid 4 diff profit center
    Profit center.       Rec comp code.   Recv sys
    P1.                       C1.                        R1
    P2.                       C2.                        R1
    PS.                       C2.                        R1
    P3.                       C3.                        R2
    Nw using this info, I want 3 diff idocs to be created for each unique comp code.
    Idoc 1 : for C1 wid one line item + 1 for reconsilation ( to be generated additionally)
    Idoc2 : for C2 wid 2 line items + 1 for reconsilation
    Idoc 3: for C3 wid 1 line item + 1 for reconsilation
    Idoc 1 and idoc 2 shud be sent to R1.
    Idoc 3 shud be sent to R2.
    Kindly advise on this

    Hi experts,
    U all r pretty close, but let me put this more clearly.
    Step1: create multiple idocs based on unique comp code - I'm able to do this using rfc lookup n split by value. So I get 3 idocs each for c1, c2 n c3.
    Nw as per the values from value mapping table.
    Idoc for c1 contains 1 line seg.
    Idoc for c2 contains 2 line segs.
    N idoc for c3 contains 1 line seg.
    steps2 n 3,  where I do not have a confirmed solution yet n need ur advise.
    Step 2 : for each idoc generated I need 2 create n additional segment, mapping 4 which will be based on the values in the original segments for that idoc.
    In d above scenario, idoc for c1 contains 1 line seg, nw I want 2 add one more seg to it. The amount and pisting key values in this segment wud be calculated based on the values of the amount and posting key belonging to the original segment in this idoc.
    Similarly for idoc for c2 there are 2 segs, nw I need one more, means 3 in allm
    Hence for idoc for c3, 1 orig already present + 1 more. = total 2.
    Nw I need ur advise on how 2 generate this additional seg in each idocm
    Step 3: when all dese 3 idocs are generated, ( in this case itz 3, in real time it can be n), I need to find their respective receivers using rfc lookup n then based on the receiver send 2 resp recvng systm
    Nw how do I do this?
    Please explain with examples if possible 4 bettr understanding.
    u2020ђąu03B7kўu03C3u03C5 in advance.

  • 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

  • How to create userdefined menus is sap b1

    hai,
    i have small doubt:
       how to create userdefined menus is sap b1
    thank u
    nagababu

    UI API provides two methods for creating and setting menus
    <b>Dynamically in Run Time</b>
    this method is used to  add a dynamic menu to your add-on forms. The dynamic menu is updated each time a new form gets focus.
    to use this method initiate the <b>MenuCreationParams</b> object and call <b>Menus.AddEx</b> to add the menu into the application.
    <b>XML Batch Operation</b>
    Use this method to load or update multiple menus simultaneously. In addition, this method allows reusing of your code in a resource-like manner to improve performance.
    After creating the menus in your code, call <b>Menus.GetAsXML</b> to get the entire SAP Business One menu structure in an XML file and call <b>Application.LoadBatchActions</b> to load the XML file instead of calling specific Add methods in your code.
    hope u will get idea abt creation of user-define menus..
    Nirdesh

  • 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 multiple instance on same database

    Hi ,
    I would like to know how to create multiple instance on same database . I know that some people use database configuration assistant to do this but i could not figure out how they did it.
    Any how if some one can help me with this and can give me links of this it would be great help for me.
    Thank you for reading my problem and helping me !
    Amil
    please if possible mail me on [email protected]

    How to create multiple instance?????Do you mean multiple instances on the same database, or multiple databases on the same machine ?
    I m new to this field....
    Willin to learn a lot about oracle....Then it wouldn't be bad reading a bit of Database Concepts

  • How to genereate multiple IDOCs from multiple rows in a single flat file

    HI,
    I am working on a scenario where I need to genereate a IDOC per one row in a flat file.
    I created DT of following strcuture:
    DT_TYPE
    --DETAILS -
    0..Unbound
    F1------0..Unbound
    F2------0..Unbound
    F3------0..Unbound
    IDOC is
    ZIDOC
    IDOC----1..1
    -BEGIN-Required
    -SEGMENT1---1..1
    -SEGEMENT2-1..1
    -SEGMENT3-1..999
    To create multiple IDOCs if there are multiple rows in a flat file in MM i choosed occurances as 0..unbound in Signiture tab
    Source structure:
    Messages------1...1
    -Message1--1....1
    DT_TYPE------0..Unbound
    DETAILS -
    0..Unbound
    F1------0..Unbound
    F2------0..Unbound
    F3------0..Unbound
    Target Strcuture:
    Messages----1....1
    -Message--1....1
    ZIDOC----1....1
    IDOC------1..1
    BEGIN---Required
    SEGMENT1-----1..1
    SEGEMENT2---1..1
    SEGMENT3---1..999
    I am unable to generate two IDOCs if there are two rows:
    Am I missing some thing?
    Thanks
    Rajeev

    HI,
    I am working on a scenario where I need to genereate a IDOC per one row in a flat file.
    I created DT of following strcuture:
    DT_TYPE
    --DETAILS -
    0..Unbound
    F1------0..Unbound
    F2------0..Unbound
    F3------0..Unbound
    IDOC is
    ZIDOC
    IDOC----1..1
    -BEGIN-Required
    -SEGMENT1---1..1
    -SEGEMENT2-1..1
    -SEGMENT3-1..999
    To create multiple IDOCs if there are multiple rows in a flat file in MM i choosed occurances as 0..unbound in Signiture tab
    Source structure:
    Messages------1...1
    -Message1--1....1
    DT_TYPE------0..Unbound
    DETAILS -
    0..Unbound
    F1------0..Unbound
    F2------0..Unbound
    F3------0..Unbound
    Target Strcuture:
    Messages----1....1
    -Message--1....1
    ZIDOC----0....unbound
    IDOC------1..1
    BEGIN---Required
    SEGMENT1-----1..1
    SEGEMENT2---1..1
    SEGMENT3---1..999
    I am unable to generate two IDOCs if there are two rows:
    Am I missing some thing?
    It isnt possible with out BPM?
    Thanks
    Rajeev

  • How  to  create an infotype in sap ecc6.0 ?

    Hi all,
    I know i how to create an infotype   in   sap 4.7, but i am facing the problem while
    creating an infotype in sap ecc6.0 version. could u plz provide me  the info with screen shots how to create an infotype and how to enhace that infotype ?
    Waiting for u r response.
    Regards,
    Ravi

    Hi ,
    To create OM infotype:
    1. Go to SE11 and create a structure HRI9XXX (9XXX --> name of the infotype). Add the required fields to this structure and save and activate. then come out of it.
    2. Go to PPCI and enter Infotype number (9XXX) and description.
    3. Click create.
    4. In the infotype category select details for the infotype.
    5. Click create button. It should create the infotype.
    6. Click on Check. A window with menu will open.
    7. In that window navigate to Table Entries.
    8. Under table Entries, select T777I and click on change.
    9. It opens SM30. Click on Maintain.
    10. Select the infotype and add information for "Time Constraint" and "Infotype Per Object Type".
    11. Save.
    12. Go back to check menu, see if all entries exist. Do not worry last 5 table entries. And you are done

  • HOW TO CREATE A VARIABLE IN SAP SCRIPT

    HI ALL,
    CAN ANYONE TELL ME HOW TO CREATE A VARIABLE IN SAP SCRIPT.
    THANK YOU,
    BYE
    TAKE CARE.

    Hi Ravi,
    You can use like this
    A text in the editor contains the following DEFINE commands:
    /: DEFINE &mysymbol& = 'xxx xxx xxxxx xxxx'
    &mysymbol&
    /: DEFINE &mysymbol& = 'yyyyy yyy yyyy'
    / &mysymbol&
    The printed text appears

  • How to creat purchase register in SAP r/3 system?

    Dear All,
    Please tell me how to creat purchase register in sap R/3 system.

    HI
    I think there is no standard functionality in sap u need to develop with abaper help with proper logic
    if it is for venijula s_alr_87009936  try this t.code
    Thanks & Regards
    Phaneendra
    Edited by: phaneendra Reddy on Jun 12, 2009 9:24 AM

Maybe you are looking for

  • Advice needed on combining libraries

    Hello. I am about to upgrade to A3 and would like some advice on the best way to accomplish my goal. I have an Iphoto library, and a A2 library. Neither of these is arranged in a date style file system, which is what I would like. Right now they are

  • Sales document header/item text

    Header and item text saved during sales document create uses XXXXXXXXXX as the tdname, because the sales document number has not been determined yet.  Occasionally, this text gets left behind.  Subsequent documents being created get the stranded text

  • Container element value does not display

    Hi, I am facing a strange issue. There is one step in my custom workflow which sends sap mail. The subject of the e-mail has a container element &notif&. When I check the workflow log this container element gets set with a value just before this step

  • SWF not Loaded 100% using SWFLoader !!!!!!!

    HI all, Iam working in Flex Project, i got hung up with a issue with SWFLoader, I have main application and a sub application developed in FLEX 3, the sub application contains the flex pages of DashBoard screen, the SWF of sub application is loaded i

  • Robot screen capture problem on Mac os 10

    Dear all, I perform a screen capture with jframe size.The background capture is ok but i have a line border around the rectangle determined by the capture and a shadow in capture background.. How to remove the line border of capture, and suppress the