How to find linked IDOCs from Archive Sales Orders

Hi Experts,
    Just would like to know if there's a way to find  IDOCs that is linked to an archive Sales Order. I'm archiving IDOCs base on its Sales Order Document, If the SO doc is already archive then its IDOCs should also be archive.
Best regards,
    JP

Hi Mylen,
Yup... they're linked. Our sales order document are created from an IDOCs. During the archiving of those sales orders, it's related  IDOCs are still left in the system and later archived according to their age and not the status. What I want to do is  to hold  IDocs for as long as the reference sales document (object) is still on the system and archive them if the reference doc has been archived. Thanks for replying.
Best regards,
   JP

Similar Messages

  • How to find the history of the sales order

    hi
    how to find the history of the sales order

    the history can be of two types:
    1) Changes to the Document:
        The changes made to the sales order which can be viewed using:
        Menu-> environment -> changes.
       the changes to the documents are shown from Change documents with selection on
       tables CDHDR with objectclas = 'VERKBELEG' and objectid = <document number>.
    2) Preceding or Follow-on Documents:
        The document flow for the sales order which can be viewed using:
        Menu-> environment ->Display Document flow.
        this is obtained from the table VBFA.
       Hope this solves ur Query.
       Please award points if u feel the answer was useful.
       thanks,
       Nivin Joseph
    Message was edited by:
            Nivin Joseph Varkey

  • How to find out Enhancement details for Sales Order

    Hello,
    Follwing is the scenerio:
    As soon as Third Party Sales Order created, Header Billing block gets triggered (from Sales Doc settings in VOV8).
    In Sales Order there are 4 items of items:
    1. Hardware Material (Price) with Item Category, say A
    2. Hardware Material (Free-of-Charge) with item category, say B
    3. Service Material (Price) with Item Category, say C
    4. Service Material (Free-of-Charge) with item category, say D
    Now there is another billing block, at item level, for Hardware Material (Price) - item cat. A, ONLY.
    I checked item cat. in VOV7, and this block is not configured there.
    Sales Order saved (with pop-up message - Maintain Serial No. for Material, but as it's third party Order, stock is not in Inventory, so no Serial number at this point of time). PR triggered upon saving the Order. from PR, PO gets generated,and then MIRO.
    Now, as vendor Invoice received with Stock details (Manufacturer's Serial No.), we go to VA02 and maintain Serial No. (Extra --> Serial No.) for all 4 types of material (Pls note that Billing block is for Hardware Price Material, but we need to maintain Serial No. for all 4 types of material) and save order.
    As soon as, serial no. maintained, item level billing block gets removed for Hardware (price) material, automatically.
    I need to understand how this functionality has been achieved?
    More precisely how and where i can see the technical details, like What program is being developed, which user-exit is being used etc...
    Thanks.

    Hi Sumitra,
    Since the system exit handler has to call your BADI  go to SE24 and display
    CL_EXITHANDLER
    Chose method get_instance and set a break point.
    And, then press F8, so it will show all the Badi's.
    Regard's,
    Shivesh Ranjan.

  • How to retrieve invoice details from the sales order .. urgent..

    hi,
    i am retrieving  vbak-vbeln with this i should retreive invoice details
    how to relate vbak with abrk table
    i have vbak -vbeln,erdat,VBAK- VKORG,VBAK-KUNNR,VBAK-VTWEG,VBAK- SPART.
    its urgent..

    Hi
    U can see the sales order number in VBRP table, fields:
    VBRP-AUBEL and VBRP-AUPOS.
    But if u have the sales order number it's better to use VBFA table.
    SELECT * FROM VBFA WHERE VBELV = VBAK-VBELN
                         AND VBTYP_N = 'M'
      SELECT SINGLE * VBRK WHERE VBELN = VBFA-VBELN.
      IF SY-SUBRC = 0.
        WRITE: 'Bill number:', VBRK-VBELN.
      ENDIF.
    ENDSELECT.
    U have to make sure to use the right document type:
    M = Invoice
    N = Invoice cancellation
    So the bill type depends on the sales order type
    Max

  • In MTO VC scenario, how to deliver subassemblies separately from a sales order

    Finished good has two sub-assemblies for the main assembly. The main assembly is not an assembly actually but Customer orders it as Assembled component of Subassembly 1 And Sub assembly 2. There are cases where Sub assemblies can be shipped separately which are then assembled at the Customer Site.
    Main FG product and sub-assemblies are both Configurable materials.
    In the above scenario which MRP strategy is more suitable and how to dispatch individual subassemblies separately.
    Also there should be option to produce subassembly separately if the need arises.
    Ex: Box assembly is made of Lid & Pan. All the 3 materials are configurable as per Customer requirement.
    Customers order for Box assembly in the sales order
    Need to know which is most suitable strategy which can satisfy below req's
    1. Box can be produced as assembly and dispactched
    2. Lid and Cover can be produced separately and can be assembled at Customer site
    3. Delivery of individual LId and cover can be made separately
    4. Production order creation should be possible for Box, Lid or Pan separately

    Repeating answer since Q is duplicated in two forums:
    Hi There,
    are you sure that your Item A is a genuine Pick To Order? - I would think that a PTO would result in exploding the OM Line to separate lines for the components and when they are ATO's they individually would result in WIP Jobs.
    Anyway once the toplevel Item is resulting in a WIP job the only mechanism for creating the remaining component jobs are via an MRP breakdown done by the classical MRP or ASCP planning run.
    To tie the different jobs together (hard-pegging) you would have to look at Project MFG (PJM) e.g. in the simple version of SEIBANs.
    /Niels LM

  • How to Invoke custom Idoc for a sales order

    How to create/invoke a custom Idoc when a service order(IW31) IS-U is created or modified ?

    Hi Senthil,
    You can use the output determination technique for this,
    so when ever it got created this out put will be trigered and configure your partner profile also in the similar way.
    Regards,
    sasi

  • How to transfer cost from old sales order (cancelled) to new sales order

    Hi Gurus
    I want to know, how to move cost from one sales order to another sales order.
    SD created sales order before 1 month and there was production order behind this. Production was completed and all the cost was moved to sales order and also SD has raised invoice on customer. This transaction was completed.
    The above order was rejected by customer due to some changes in the order. SD raised another sales order and production order was created to to additional work. Production transfered above stock (produce before on old production order) to new production order.
    My problem is stock is now transfered to new production order but cost is still sitting on old sales order. How do I transfer cost from old sales order to new sales order. SD cancelled old invoice and raised new one with full value (old + new work) on new sales order. Now cost is on old sales order and revenue is on new sales order.
    Please help.
    Thanks

    Hi
    I have reverse the sales order settlement, PP order settlement to sales order and I have also done KB11N for transfering the cost to the new production order.
    The only problem is I was unable to transfer labour hour confirmation as cost element used for this are not for transfering cost. If I will reverse the confirmation in PP order system will reverse material movement also which I don't want any more. Can you please tell me how to I reverse the Labour hours with out affecting goods movement?
    Many thanks

  • How to create delivery from a sales order?

    Hi friends,
    Can you tell me how to crete a delivery from a sales order?
    First, I would like to know which transaction we use to create and how?
    Appreciate your input.
    Thanks,
    Krishen
    P.S. Points assured for helpful answers and thanks in advance for your time.

    VL01 is the transaction for the creation of Delivery
    VL01   SAPMV50A       Create Delivery
    VL01N  SAPMV50A       Create Outbound Dlv. with Order Ref
    VL01NO SAPMV50A       Create Outbound Dlv. w/o Order Ref.
    Message was edited by: Gopi Narendra

  • Header text to be copied from the sales order to delivery

    Hi Gurus,
    I have a requirement in which  header text "Customer order text " needs to be copied from the sales order to the delivery.After copying the text we need to print on the packing slip.
    Can anyone advise me as how to copy the text from the sales order header to delivery  and then print on the packing slip.
    Thanks ,
    Smitha.

    Maintain the Text ID @ Sales Documnet Header level and add it to your Text Procedure. Also ensure you assign the access sequence to your Text ID in your procedure.
    Access Seuquence should have VBBK and the text ID number and check All Languages and use Requirement 1.
    Then in the Delivery Header Text Procudure add this text ID and assign the same access sequence as above.
    This will copy the Text ID from Sales Order to Delivery Order Header.
    You can configure the output for packing slipduring the delivery process  and in the output program read this Text ID and print it.
    Note" Copy Controls do not copy text from preceeding documents to succeeding documents. Only the Access Sequences used in the Text Procedure will do that with the help of the reuqirement assigned in the same.
    Thanks and Hope this helps.
    Sai

  • How to find Outbound Idoc number from inbound Idoc number.

    Hi,
    I have one inbound Idoc in my system, then
    How to find the  idoc number from the system which sends that idoc(Outbound Idoc number).

    Hello
    You can use fm SREL_GET_NEXT_NEIGHBORS for this purpose.
    Scenario: An EDI purchase order is received by SAP-XI and forwarded as Inbound ORDERS IDoc to R/3. SAP-XI generates an (outbound) IDoc number which differs from the (inbound) ORDERS05 IDoc in the R/3 system.
    Calling fm SREL_GET_NEXT_NEIGHBORS with the following parameters:
    OBJECT-OBJKEY = <IDoc number, 16-digits>
    OBJECT-OBJTYPE = 'IDOC'
    MAX_HOPS = '99'            " <<< get all links
    I get the following result:
    0000000000133906                                   IDOC       CUSTOMER   OUTIDOC
    0000000000407402                                   IDOC                  INIDOC
    000000370383                                       BUS2012    CUSTOMER   OUTBELEG
    0010057944                                         BUS2032               INBELEG
    Outbound IDoc number
    Inbound IDoc number (ORDERS05)
    PO number
    Sales order (created from inbound ORDERS IDoc)
    Regards
      Uwe

  • How to block the creation of a Sales Orders without a linked Purchase Order

    Hi. I'm trying to block the creation of a Sales Order that doesn't have a linked Purchase Order. The first thing I did is using the SBO Transaction Notification as follows:
    IF  @transaction_type = 'A' AND @object_type='17'
    BEGIN
         IF (SELECT PoPrss FROM ORDR WHERE DocEntry = @list_of_cols_val_tab_del) = 'N'
         BEGIN
              SET @error = 1
              SET @error_message = 'Purchase Order Missing...'
         END
    END
    This works good. I create the Sales Order, I tick the purchase order field on the logistics tab, I click Add, and then the purchase order window appears...
    Then, the problem begins... If I click the Cancel button, the purchase order is obviously not created, but the Sales Order is created.
    Can someone tell me how to block the creation of the sales order If the user press the cancel button on the purchase order window (and the purchase order is not created)
    As far as I can see, after clicking the add button in the sales order document, the Sales Order is created on the DB. If there's no way of blocking the creation of the Sales Order, can I avoid closing the purchase order window by the SBO_TransactionNotification? (if the purchase order has not been created)
    Thanks...

    Hi Yail,
    I think you can't close the purchase order with the stored procedure.
    Try to catch the Event when the user click on Cancel button.
    So you can list the vents with event logger : https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/ede3be37-0e01-0010-1883-cd1b5293473e
    You can block the cancel button and force the user to create the purchase order.
    Hope i help you
    Best regards
    Michael

  • Beginner advise needed on how to find link for app on ipad.

    I am an absolute beginner with a recently purchased ipad 2. I have just purchased garageband from the app store but how do I open it? There is no link on my ipad anywhere but when i check settings it says that garageband is installed. Can someone please advise me on how to find link or am i missing somethng really obvious here, cheers.

    Look for the Garage Band icon on one of your home screens. Tap on it in order to launch it. Swipe from one screen to the next (swipe to the left with your finger) if you do not see it on the first screen.
    If you still can't find it - swipe to the right from your very first home screen and a search feature appears on the screen. Type Garage Band in the text field and search for the app.

  • Reload Idoc from archive file

    Hi,
    I know the program RSEXARCL which will reload the idoc from archive file.
    If there is any SAP program to reload the particular outbound idoc from archive file by giving idoc number in the selection screen?
    After reloading to database ,we need to send this idoc to external system .
    Kindly help.
    Thanks,
    Anil

    Hi,
    Please check the below link:
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/17c435df-0901-0010-72a7-b9dcd271213d?QuickLink=index&overridelayout=true&5003637692468
    Regards,
    Rajesh

  • How to retrieve the ARCHIVED Sales order data

    Hi All,
    When issuing the output for the delivery, it is giving an error saying 'Sales Order XXXX does not exist' due to which the prices in the output were displayed as '0'. Reason for this can be that 'the order might have been archived'.
    My requirement is,
    1. If Sales Order doesnu2019t exist in data base then need to check if Sales order exists in archive data base.
    2. If  yes, take needed data from archive data base tables to calculate price. The logic of price calculation should be the same as for not archived Sales Orders.
    Can anyone help me on this..?
    Please tell me how to check whether the Sales order exists in the Archived database. Please share the table names(sample logic if possible) sothat I can use them in the report logic.
    Please tell me how to pull the data from the archive database tables to calculate the price.
    Thank you in advance.
    Thanks & Regards,
    Paddu.
    Edited by: Paddu K on Feb 23, 2009 3:42 PM

    *&      Form  get_archive_data
    *       Fetch Archive Data
    FORM get_archive_data .
      CLEAR:    g_read_handle, g_commit_cnt,
                g_read_cnt, g_reload_cnt,it_rel_tab,it_bseg_a,it_bkpf_a,
                it_bset_a, gt_result.
      REFRESH: it_rel_tab[],it_bseg_a[],it_bkpf_a[],
               it_bset_a[], gt_result[].
    *Populating selection screen fields to field-symbols
      PERFORM build_fs_select_options.
    *Call FM as_api_read  FI Data
      CALL FUNCTION 'AS_API_READ'
        EXPORTING
          i_fieldcat                      = 'SAP_FI_DOC_002'
          i_selections                    = ft_selections[]
    *   I_OBLIGATORY_FIELDS             =
    *   I_MAXROWS                       =
       IMPORTING
         e_result                        = gt_result[]
    EXCEPTIONS
       parameters_invalid              = 1
       no_infostruc_found              = 2
       field_missing_in_fieldcat       = 3
       OTHERS                          = 4
      IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      IF NOT gt_result[] IS INITIAL.
    *Sorting by KEY and Offset
        SORT gt_result BY archivekey archiveofs.
    *To delete duplicates
        DELETE ADJACENT DUPLICATES FROM gt_result COMPARING archivekey
        archiveofs.
    *looping the internal table
        LOOP AT gt_result.
    *Get read handle for  object
          CALL FUNCTION 'ARCHIVE_READ_OBJECT'
            EXPORTING
              object         = 'FI_DOCUMNT'
              archivkey      = gt_result-archivekey
              offset         = gt_result-archiveofs
            IMPORTING
              archive_handle = g_read_handle
            EXCEPTIONS
              OTHERS         = 1.
          IF NOT sy-subrc IS INITIAL.
            MESSAGE ID sy-msgid TYPE 'I' NUMBER sy-msgno
                    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
            EXIT.
          ENDIF.
          IF sy-subrc = 0.
    *Get Acoounting Document details
            PERFORM object_read_opened
                      TABLES it_rel_tab
                             it_bseg_a
                             it_bkpf_a
    *                         it_bset_a
    *                         it_bsik_a
    *                         it_bsak_a
                             it_bsid_a
                             it_bsad_a
    *                         it_bsec_a
                      USING g_read_handle
                            l_archobj
                            g_commit_cnt
                            g_read_cnt
                            g_reload_cnt
          ENDIF.
    *close the file.
          CALL FUNCTION 'ARCHIVE_CLOSE_FILE'
            EXPORTING
              archive_handle          = g_read_handle
            EXCEPTIONS
              internal_error          = 1
              wrong_access_to_archive = 2
              OTHERS                  = 3.
          IF sy-subrc <> 0.
            MESSAGE i004." 'Unable to close archive session'.
            EXIT.
          ENDIF.
        ENDLOOP.
      ELSE.
        MESSAGE i000 WITH 'No data found for Archived data'(095).
        EXIT.
      ENDIF.
    *Start of Changes by GTHATIKONDA on 10/17/2008 #ECDK902204
      IF NOT it_bkpf_a[] IS INITIAL.
        SORT it_bkpf_a BY belnr.
        DELETE ADJACENT DUPLICATES FROM it_bkpf_a COMPARING belnr.
        DELETE it_bkpf_a WHERE budat GT p_budat. "#ECDK902206
      ENDIF.
    *Start of Changes by GTHATIKONDA on 10/17/2008 #ECDK902206
      IF it_bkpf_a[] IS INITIAL.
        MESSAGE i000 WITH 'No data found for Archived data'(095).
      ENDIF.
    *End of Changes by GTHATIKONDA on 10/17/2008 #ECDK902206
      IF NOT it_bseg_a[] IS INITIAL.
        SORT it_bseg_a BY belnr gjahr buzei.
        DELETE ADJACENT DUPLICATES FROM it_bseg_a COMPARING
                                              belnr gjahr buzei.
      ENDIF.
    *End of Changes by GTHATIKONDA on 10/17/2008 #ECDK902204
    ENDFORM.                    " get_archive_data
    *&      Form  build_fs_select_options
    FORM build_fs_select_options .
      REFRESH:  ft_selections.
    *Comapny code
      APPEND INITIAL LINE TO ft_selections ASSIGNING <fw_selections>.
      <fw_selections>-fieldname  = 'BUKRS'.
      APPEND INITIAL LINE TO <fw_selections>-selopt_t ASSIGNING <lw_selopt>.
      MOVE p_bukrs  TO <lw_selopt>-low.
      MOVE  'I' TO <lw_selopt>-sign.
      MOVE  'EQ' TO <lw_selopt>-option.
    *Customer
      APPEND INITIAL LINE TO ft_selections ASSIGNING <fw_selections>.
      <fw_selections>-fieldname  = 'KUNNR'.
      LOOP AT s_kunnr.
        APPEND INITIAL LINE TO <fw_selections>-selopt_t
               ASSIGNING <lw_selopt>.
        MOVE-CORRESPONDING  s_kunnr TO <lw_selopt>.
      ENDLOOP.
    *Start of changes by GTHATIKONDA on 16/10/2008 #ECDK902192
    **Customer Group
    *  append initial line to ft_selections assigning <fw_selections>.
    *  <fw_selections>-fieldname  = 'KTOKD'.
    *  loop at s_ktokd.
    *    append initial line to <fw_selections>-selopt_t
    *           assigning <lw_selopt>.
    *    move-corresponding  s_ktokd to <lw_selopt>.
    *  endloop.
    *End of changes by GTHATIKONDA on 16/10/2008 #ECDK902192
    *Profit Center
      APPEND INITIAL LINE TO ft_selections ASSIGNING <fw_selections>.
      <fw_selections>-fieldname  = 'PRCTR'.
      LOOP AT s_prctr.
        APPEND INITIAL LINE TO <fw_selections>-selopt_t
               ASSIGNING <lw_selopt>.
        MOVE-CORRESPONDING  s_prctr TO <lw_selopt>.
      ENDLOOP.
    *Commented #ECDK902210
    **Key Date
    *  append initial line to ft_selections assigning <fw_selections>.
    *  <fw_selections>-fieldname  = 'BUDAT'.
    *  append initial line to <fw_selections>-selopt_t assigning <lw_selopt>
    *  move p_budat  to <lw_selopt>-low.
    *  move  'I' to <lw_selopt>-sign.
    *  move  'EQ' to <lw_selopt>-option.
    *Aging Period1
      APPEND INITIAL LINE TO ft_selections ASSIGNING <fw_selections>.
      <fw_selections>-fieldname  = 'ANZTA'.
      APPEND INITIAL LINE TO <fw_selections>-selopt_t ASSIGNING <lw_selopt>.
      MOVE p_ag1  TO <lw_selopt>-low.
      MOVE  'I' TO <lw_selopt>-sign.
      MOVE  'EQ' TO <lw_selopt>-option.
    *Aging Period2
    *Start of changes by GTHATIKONDA on 16/10/2008 #ECDK902192
    *  append initial line to ft_selections assigning <fw_selections>.
    *  <fw_selections>-fieldname  = 'ANZTA'.
    *End of changes by GTHATIKONDA on 16/10/2008 #ECDK902192
      APPEND INITIAL LINE TO <fw_selections>-selopt_t ASSIGNING <lw_selopt>.
      MOVE p_ag2  TO <lw_selopt>-low.
      MOVE  'I' TO <lw_selopt>-sign.
      MOVE  'EQ' TO <lw_selopt>-option.
    *Aging Period3
    *Start of changes by GTHATIKONDA on 16/10/2008 #ECDK902192
    *  append initial line to ft_selections assigning <fw_selections>.
    *  <fw_selections>-fieldname  = 'ANZTA'.
    *End of changes by GTHATIKONDA on 16/10/2008 #ECDK902192
      APPEND INITIAL LINE TO <fw_selections>-selopt_t ASSIGNING <lw_selopt>.
      MOVE p_ag3  TO <lw_selopt>-low.
      MOVE  'I' TO <lw_selopt>-sign.
      MOVE  'EQ' TO <lw_selopt>-option.
    *Aging Period4
    *Start of changes by GTHATIKONDA on 16/10/2008 #ECDK902192
    *  append initial line to ft_selections assigning <fw_selections>.
    *  <fw_selections>-fieldname  = 'ANZTA'.
    *End of changes by GTHATIKONDA on 16/10/2008 #ECDK902192
      APPEND INITIAL LINE TO <fw_selections>-selopt_t ASSIGNING <lw_selopt>.
      MOVE p_ag4  TO <lw_selopt>-low.
      MOVE  'I' TO <lw_selopt>-sign.
      MOVE  'EQ' TO <lw_selopt>-option.
    *Aging Period5
    *Start of changes by GTHATIKONDA on 16/10/2008 #ECDK902192
    *  append initial line to ft_selections assigning <fw_selections>.
    *  <fw_selections>-fieldname = 'ANZTA'.
    *End of changes by GTHATIKONDA on 16/10/2008 #ECDK902192
      APPEND INITIAL LINE TO <fw_selections>-selopt_t ASSIGNING <lw_selopt>.
      MOVE p_ag5  TO <lw_selopt>-low.
      MOVE  'I' TO <lw_selopt>-sign.
      MOVE  'EQ' TO <lw_selopt>-option.
    ENDFORM.                    " build_fs_select_options
    *&      Form  object_read_opened
    *       To Fetch Arichive Data
    FORM object_read_opened TABLES   it_rel_tab
                                      it_bseg_a
                                      it_bkpf_a
    *                                  it_bset_a
    *                                  it_bsik_a
    *                                  it_bsak_a
                                      it_bsid_a
                                      it_bsad_a
    *                                 it_bsec_a
                             USING value(g_read_handle) LIKE sy-tabix
                                   value(l_archobj) LIKE arch_def-object
                             value(g_commit_cnt) LIKE arch_usr-arch_comit
                               g_read_cnt TYPE i
                               g_reload_cnt TYPE i.
      DATA: BEGIN OF table_wa ,
               table LIKE arch_stat-tabname,
            END  OF table_wa.
      DATA: lit_data(2048) TYPE c OCCURS 1 WITH HEADER LINE.
      DATA:  l_structure LIKE arch_stat-tabname,
             l_lin TYPE i.
      CLEAR: it_table_org1,lit_struc,it_table_org2,table_wa,it_rel_tab.
      REFRESH: it_table_org1[],lit_struc[],it_table_org2[],it_rel_tab[].
      CLEAR: g_duprec,g_read_cnt,g_reload_cnt,g_object_cnt.
    *Read  data from the infostructure
      DO.
        ADD 1 TO g_object_cnt.
        CLEAR l_structure.
        CALL FUNCTION 'ARCHIVE_GET_NEXT_RECORD'
          EXPORTING
            archive_handle                = g_read_handle
         IMPORTING
           record                        = lit_data
    *   RECORD_CURSOR                 =
    *   RECORD_FLAGS                  =
           record_structure              = l_structure
    *   RECORD_LENGTH                 =
    *   RECORD_REF                    =
         EXCEPTIONS
           end_of_object                 = 1
           internal_error                = 2
           wrong_access_to_archive       = 3
           OTHERS                        = 4
        IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          EXIT.
        ENDIF.
        IF NOT l_structure IS INITIAL.
          table_wa-table = l_structure.
          APPEND table_wa TO it_rel_tab.
        ENDIF.
        APPEND lit_data.
        CLEAR l_lin.
        FIELD-SYMBOLS: <fs_struc> TYPE c.
        CASE l_structure.
    *BKPF data
          WHEN 'BKPF'.
            ASSIGN it_bkpf_a TO <fs_struc> CASTING.
            <fs_struc> = lit_data.
            APPEND it_bkpf_a.
    *BSID data
          WHEN  'BSID'.
            ASSIGN it_bsid_a TO <fs_struc> CASTING.
            <fs_struc> = lit_data.
            APPEND it_bsid_a.
    *BSAD data
          WHEN  'BSAD'.
            ASSIGN it_bsad_a TO <fs_struc> CASTING.
            <fs_struc> = lit_data.
            APPEND it_bsad_a.
    *BSEG data
          WHEN 'BSEG'.
            ASSIGN it_bseg_a TO <fs_struc> CASTING.
            <fs_struc> = lit_data.
            APPEND it_bseg_a.
        ENDCASE.
        REFRESH lit_data.
        CLEAR g_object_cnt.
      ENDDO.
    ENDFORM.                    " object_read_opened
    *&      Form  get_bsid_bsad_archive_data
    *If Exclude Spl. GL Trnasaction is initial get BSID BSAD Archive data  *
    FORM get_bsid_bsad_archive_data .
    *Work Area
      DATA: wa_bsid TYPE type_bsid.
    *Reading BSAD Archive internal table
    *      loop at it_bsad_a   where bukrs eq p_bukrs
    *Start of changes by GTHATIKONDA on 10/14/2008 #ECDK902180
    *Commented by GTHATIKONDA on 10/17/2008 #ECDK902204
      LOOP AT it_bkpf_a  WHERE  bukrs = p_bukrs AND
                                budat LE p_budat. "#ECDK902206
    *End of changes by GTHATIKONDA on 10/14/2008 #ECDK902180
        LOOP AT it_bseg_a   WHERE bukrs EQ p_bukrs AND
                                  belnr EQ it_bkpf_a-belnr AND
                                  gjahr EQ it_bkpf_a-gjahr AND
                                  augdt GT p_budat AND
    *                            koart eq 'D'     and
                                  kunnr IN s_kunnr AND
                                  prctr IN s_prctr.
    *Changes by GTHATIKONDA on 10/17/2008 #ECDK902204
    *    loop at it_bkpf_a  where budat le p_budat."#ECDK902206
    *Move corresponding fiels
          MOVE-CORRESPONDING it_bseg_a TO wa_bsid.
          wa_bsid-blart = it_bkpf_a-blart.
          wa_bsid-budat = it_bkpf_a-budat.
          wa_bsid-bldat = it_bkpf_a-bldat.
          APPEND wa_bsid TO i_bsad.
          CLEAR wa_bsid.
        ENDLOOP.
      ENDLOOP.
      IF NOT i_bsad[] IS INITIAL.
        APPEND LINES OF i_bsad TO i_bsid.
      ENDIF.
    *Start of Changes by GTHATIKONDA on 10/17/2008 #ECDK902206
      IF NOT i_bsid[] IS INITIAL.
        SORT i_bsid BY belnr.
    *Commenting this logic by GTATIKONDA on 10/31/2008 #ECDK902245
    *  delete adjacent duplicates from i_bsid comparing belnr.
      ENDIF.
    *End of Changes by GTHATIKONDA on 10/17/2008 #ECDK902206
    ENDFORM.                    " get_bsid_bsad_archive_data
    *Reading BSAD Archive internal table
    *      loop at it_bsad_a  where bukrs eq p_bukrs
    *Start of changes by GTHATIKONDA on 10/14/2008 #ECDK902180
    *Commented by GTHATIKONDA on 10/17/2008 #ECDK902204
      LOOP AT it_bkpf_a  WHERE bukrs = p_bukrs AND  "#ECDK902206
                               budat LE p_budat.
    *End of changes by GTHATIKONDA on 10/14/2008 #ECDK902180
        LOOP AT it_bseg_a  WHERE bukrs EQ p_bukrs AND
                                 belnr EQ it_bkpf_a-belnr AND
                                 gjahr EQ it_bkpf_a-gjahr AND
                                 kunnr IN s_kunnr AND
                                 umskz EQ space AND
                                 augdt GT p_budat AND
                                 prctr IN s_prctr.
    *Changes by GTHATIKONDA on 10/17/2008 #ECDK902204
    *    loop at it_bkpf_a  where budat le p_budat. "#ECDK902206
    *Move corresponding fiels
          MOVE-CORRESPONDING it_bseg_a TO wa_bsid.
          wa_bsid-blart = it_bkpf_a-blart.
          wa_bsid-budat = it_bkpf_a-budat.
          wa_bsid-bldat = it_bkpf_a-bldat.
          APPEND wa_bsid TO i_bsad.
          CLEAR wa_bsid.
        ENDLOOP.
      ENDLOOP.
      IF NOT i_bsad[] IS INITIAL.
        APPEND LINES OF i_bsad TO i_bsid.
      ENDIF.

  • 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

Maybe you are looking for

  • Windows Vista 64 bit and Treo 755p

    Hello, I am wondering if the latest software update will allow me to sync using HotSync and a cable.  When I got my 755 it said that it was not compatible with my new computer that has the 64 bit Vista.  Is this going to be fixed eventually or should

  • Since installing Firefox 29, my router constantly reboots on its own

    Since installing Firefox 29, my router constantly reboots on its own. Is anyone else having this problem? And could it indeed be caused by Firefox?

  • Hide/Show Create button on a report/form page

    Hi, I included one form and the related report on one page. When I create a new record, it will show in the report below. I make the ID column as the link, which assign the ID to the ID item in the form. DML will do the rest work for display. However

  • HOW The **** DO I PUT MY DVDS ONTO MY IPOD

    ok i may not bell super smart but i got like 300 dvds dieing to go onto my ipod how to i put them onto my p.c to put them on my ipod huh

  • RDS 2012 R2 Collection - Published Remoteapps not visible

    Hello, I have a strange issue with a RDS Deployment I´m setting up for a customer. RDS Roles setup: Server1: RD Licensing / RD Gateway Server2: RD Connection Broker / RD Sessions Host / RD Web Access I´m all done with the LOB Apps as well as adding ~