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

Transformations

I have a DSO (A) with data. Now I need to upload it into another DSO (B) with

few new infoobjects derived in between.

In my DSO A, I have data at Header and Item level.

In a header, we can have multiple items and each item can correspond to either

SOURCE or target related data and each item is categorized in to either

source or target based on TYPE infobject (S or T).

Data Set example:

HEADER|ITEM|TYPE|LOCATION|DATE|QUANTITY

500001|0010|S|PHILADELPHI|02022010|240

500001|0020|T|PITTSBURGHH|02032010|240

In the above data set, item 0010 is Source and 0020 is target. Now using above

data set, I need to make 2 records into 1, meaning both Source and its

target into 1 record.

I will create different infoobjects each 1 for Source and target. For eg,

Source Qty, target Qty, Source LOcation, target Location, Target Date, Target Qty etc...

Now when im updating from A to B, all i need is to identify 2 items in a

header with same quantities and assign the corresponding characteristic

values (Qty, Location etc) to Source and

target info objects (Source Qty, target Qty, Source LOcation,

target Location etc...).

To identify which item/record is source and which one is target,

we have a characteristic (type) which has values 'S' and 'T'.

How do I proceed with this? I know this can be done in the Start Routine, but how do i code? Starting help would be appreciated.

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Oct 15, 2010 at 07:17 AM

    Hi

    Would suggest you to try the option of rule groups. In one rule group map the source fields to Source fields and second map to target fields. Then in routine filter out type T in Rule Group1 and type S in Rule Group 2.

    Other way is to write End Routine.

    "Declare 1 internal table of structure DSO1 and 1 of DSO2

    itab_dso2[] = result_package[].

    Delete itab_dso2 where type = 'T'. "this will retain only records of type source.

    Select * from DSO1 into itab_dso1 for all entries in result_package where header = result_package-header and type = 'T'. "Now u have the corresponding target records.

    Loop at itab_dso2 assigning <result_fields>.

    Read itab_dso1 into wa_dso1 with key header = <resultfields>-header.

    <result_fields>-target loc = wa_target-location. "Assign target values

    Endloop.

    refresh result_package.

    result_package[] = itab_dso2[].

    Pls let me know in case u need more info.

    Reg

    Aparna

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 07, 2010 at 09:30 PM

    Any suggestions guys?

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 14, 2010 at 02:05 PM

    If Header is the unique Key in your DSO2;

    two load from DSO1 to DSO2:

    - load 1 DSO1->DSO2: with Transformation mapping to Source-InfoObject:: select S records

    - load 2 DSO1->DSO2: with Transformation mapping to Target-InfoObject:: select T records

    is the Header is unique,overwrite Source in load 1, and Target in load 2

    DSO1:

    HEADER|ITEM|TYPE|LOCATION|DATE|QUANTITY

    500001|0010|S|PHILADELPHI|02022010|240

    500001|0020|T|PITTSBURGHH|02032010|240

    DSO2:load 1(TYPE=S ; map SOURCE):

    HEADER | SOURCE-LOCATION | TARGET-LOCATION

    500001 | PHILADELPHI | -

    DSO2:load 2 (TYPE=T; map TARGET):

    HEADER | SOURCE-LOCATION | TARGET-LOCATION

    500001 | PHILADELPHI | PITTSBURGHH

    done

    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.