Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9071

Re: Creating multiple segments with the output of RFC lookup

$
0
0

Hello Muniyappan

 

The logic and code you provided worked perfectly fine if only one kind of REGION records are coming from source table. But now there is change in requirement and accordingly I need to change mapping and UDF code.

 

Previously I took example of getting records for only one REGION at a time, but using SELECT query in sender cc we cannot restrict to pick up one kind of REGION in 1st call and then other kind of REGION in second call. In source table REGION are many e.g. BRA, NEU, LATAM etc.

 

Using stored procedure this can be done or not, I have no idea. If this can be achieved then my problem is resolved otherwise need to do changes in mapping.

 

Sender CC can fetch records like below

8.PNG

 

Table in ECC contains one Sales_Org for BRA and seven Sales_Org for NEU

 

According to above input I need to achieve:

One IDOC for both BRA

Two segments of E1MARAM

One segment of E1MVKEM under both E1MARAM

 

One IDOC for NEU

One segment of E1MARAM

Seven segment of E1MVKEM under one E1MARAM

 

IDOC

     E1MARAM

          E1MVKEM

     E1MARAM

          E1MVKEM

 

IDOC

     E1MARAM

          E1MVKEM

          E1MVKEM

          E1MVKEM

          E1MVKEM

          E1MVKEM

          E1MVKEM

          E1MVKEM

 

I am able to achieve

 

IDOC

     E1MARAM

     E1MARAM

 

IDOC

     E1MARAM

 

but E1MVKEM contexts are in wrong shape

 

Mapping screenshots are below

 

Mapping of E1MVKEM

9.PNG

 

Display Queue of RFC Lookup

10.PNG

 

Display Queue of Divide

Diaplay queue of divide.PNG

 

Wrong input and output values. It should be [1], [1] and [7]

 

 

Display Queue of ContextChange

display queue of contextchange.PNG

 

Input 1 should be [1], [1], [7]

Output should be [BRA]

                             Context Change

                            [BRA]

                            Context Change

                            [NEU]

                            [NEU]

                            [NEU]

                            [NEU]

                            [NEU]

                            [NEU]

                            [NEU]

 

I tried to modify you code but did not succeed. I am not good in Java.

 

IDOC Mapping

IDOC mapping.PNG

 

E1MARAM Mapping

E1MARAM Mapping.PNG

 

Please reply ASAP need this urgently.

 

Thanks

Dheeraj Kumar


Viewing all articles
Browse latest Browse all 9071

Trending Articles