Skip to Content
avatar image
Former Member

Multimapping N:N

Hello,

My problem is structure resultset mapping to rows (header - details).

Structure SOURCE.

Resulset

ROW (0..outbound)

-ID (Identificador)

-NAME

-NUM

Example

ID ;NAME;NUM

ID1 ;xxxx ;100

ID1 ;xxxx ;120

ID2 ;yyyy ;100

ID2 ;yyyy ;110

ID2 ;yyyy ;120

Structure TARGET

ROW (0..outbound)

HEADER (1..1)

-ID

DETAILS (1..outbound)

-NAME

-NUM

Example.

ROW (1)

HEADER (ID1)

DETAILS (xxxx;100)

DETAILS (xxxx;120)

ROW (2)

HEADER (ID2)

DETAILS (yyyy;100)

DETAILS (yyyy;110)

DETAILS (yyyy;120)

My problem is mapping.

ROW ; HEADER ; DETAILS

Atte. Claudio Leó

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

4 Answers

  • Sep 03, 2008 at 08:12 AM

    Hi,

    You can do the following steps:

    For Row:

    ID --> RemoveContext --> Sort: Lexicographical Case Insensitive Ascending --> SplitByValue: ValueChanged --> CollapseContexts --> ROW

    no mapping is required for HEADER

    For Details:

    ID --> RemoveContext --> Sort: Lexicographical Case Insensitive Ascending --> SplitByValue: ValueChanged --> DETAILS

    For Name:

    [ID --> RemoveContext (1)] & [Name --> RemoveContext (2)] --> SortByKey: Lexicographical Case Insensitive Ascending --> SplitByValue: EachValue --> NAME

    For Num:

    [ID --> RemoveContext (1)] & [Name --> RemoveContext (2)] --> SortByKey: Lexicographical Case Insensitive Ascending --> SplitByValue: EachValue --> NUM

    Please award points if helpful..

    Regards

    Add comment
    10|10000 characters needed characters exceeded

  • Sep 04, 2008 at 10:29 PM
    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 06, 2008 at 06:28 PM

    Hello.

    My previous problem is already solved. Thank you very much.

    But now presented another problem. You can help me fix it.

    Structure SOURCE.

    Resulset

    ROW (0..outbound)

    -ID (Identificador)

    -BUS_ACT

    -USERNAME

    -ITEMNO_ACC1

    -CUSTOMER1

    -GL_ACCOUNT1

    -ITEMNO_ACC2

    -CUSTOMER2

    -GL_ACCOUNT2

    Example

    ID ;BUS_ACT;USERNAME;ITEMNO_ACC1;CUSTOMER1;GL_ACCOUNT1;ITEMNO_ACC2;CUSTOMER2;GL_ACCOUNT2

    ID1;BUS1;CLEON;1;CUS1;

    ID1;BUS1;CLEON;2;CUS2;

    ID2;BUS1;CLEON;1;CUS1;GL01; ; ;

    ID2;BUS1;CLEON;2;CUS2;GL01; ; ;

    ID2;BUS1;CLEON;3;CUS3;GL01; ; ;

    ID2;BUS1;CLEON; ; ; ;1;CUS1;GL01

    ID2;BUS1;CLEON; ; ; ;2;CUS2;GL02

    Structure TARGET.

    BAPI_ACC_DOCUMENT_POST (0..Unbound)

    -DOCUMENTHEADER (1..1)

    - - BUS_ACT

    - - USERNAME

    -ACCOUNTRECEIVABLE (0..1)

    --ITEMS(1..Outbound)

    - - - ITEMNO_ACC1

    - - - CUSTOMER1

    - - - GL_ACCOUNT1

    CURRENCYAMOUN (1..1)

    --ITEMS(1..Outbound)

    - - - ITEMNO_ACC2

    - - - CUSTOMER2

    - - - GL_ACCOUNT2

    Add comment
    10|10000 characters needed characters exceeded

  • Sep 09, 2008 at 02:16 PM

    Hi Claudio,

    If the first problem is already solved, then I guess you can already close this question 😊 You can open another thread for your other question.

    Regards

    Add comment
    10|10000 characters needed characters exceeded