Skip to Content
author's profile photo Former Member
Former Member

LookUp Routine from One DSO to other DSO.

Hello,

I have to write field level routine (BI7) or fill the infoObject of DSO in Transformation by using lookup from otherDSO. Moreover large amount of data is getting loaded.

i guess We can write routine in two ways One is from via Start Routine and other method is InfoObject level/Char Routine.

Could anybody help.Also require some sample code for handling the same.

Purchasing document number and item are common in both dso's.

cheerz,

raps.

Edited by: Rajeev Pasupula on Aug 24, 2011 9:54 AM

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Aug 24, 2011 at 08:21 AM
    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 24, 2011 at 08:51 AM

    Hi Raps,

    maybe it is better to use a start routine for populating an internal table with the information required (this internal table has to be declared in global declaration for use it after) and read this table in field routine (you cannot use only a start routine for your purpose because you don't have in it the fields of your target DSO).

    Calling InfoObject = IO and table of your other DSO = /BIC/AZ*, you can fill in your start routine the following code:

    • begin of global declaration *

    DATA: lt_AZ TYPE STANDARD TABLE OF /BIC/AZ* ,

    wa_AZ TYPE /BIC/AZ* .

    • end of global declaration *

    • start of routine *

    SELECT EBELN AC_DOC_LN IO

    FROM /BIC/AZ*

    into corresponding fields of table lt_AZ

    for all entries in SOURCE_PACKAGE

    where EBELN = SOURCE_PACKAGE-EBELN

    and AC_DOC_LN = SOURCE_PACKAGE-AC_DOC_LN.

    • end of routine *

    In field routine you can read lt_AZ and you have to fill in this code:

    READ TABLE lt_AZ INTO wa_AZ.

    WITH KEY wa_AZ-EBELN = SOURCE_FIELDS-EBELN

    AND wa_AZ-AC_DOC_LN = SOURCE_FIELDS-AC_DOC_LN.

    IF SY-SUBRC = 0.

    RESULT = wa_AZ-IO.

    CLEAR wa_AZ.

    ENDIF.

    Please check:

    -- if the code in start routine identifies uniquely the correct record in other DSO (if you cannot, please fill other conditions in WHERE statement according to restrict correctly the selection from this DSO);

    -- if the technical names of document and item are correct and if you have not standard InfoObject you have to use /bic/IO in place of IO.

    Hope it helps.

    Best regards.

    Simone.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.