Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Help On IDOC Program

Former Member
0 Likes
1,925

Dear Friends,

I am having E1EDPT1 segment,

which is in intially having only one child segment E1EDPT2, now i want to add some more child segments E1EDPT2 to my E1EDPT1 during run time .

How can i do this ? Please help me, this is very urgent issue.

This E1EDPT2 contains TDLINE & TDFORMAT .

Thanks & Regards,

Joseph

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,767

hi paulraj search a user exit relevant to the program, then using EDIDD,EDIDC,EDIDS structure you can write a coding to populate the segment.mostly the function module used to populate the segment.i think depends upon the output type you can populte the segment

14 REPLIES 14
Read only

ferry_lianto
Active Contributor
0 Likes
1,767

Hi Joseph,

Please search whether there is a user exits available in the function module to place your additional codes to add new segment for E1EDPT2.

Hope this will help.

Regards,

Ferry Lianto

Please reward points if helpful.

Read only

0 Likes
1,767

Hi Lianto,

we are using only 2 user exits, MV45AFZB and MV45AFZZ,

i searched in that but couldn't find any code to add new segment.

is there any other way to do this ?

Thanks & Regards,

Joseph

Read only

0 Likes
1,767

Its inbound IDOC coming from Biztalk,

and posting a sales order in SAP. ORDERS is the message type.

Read only

0 Likes
1,767

Joseph,

You cant add segments to the inbound IDoc since it is already created in SAP. What you do is modify your inbound processing function module or find a user exit where you can add extra text lines to the existing text in the IDoc.

-Kiran

Read only

Former Member
0 Likes
1,768

hi paulraj search a user exit relevant to the program, then using EDIDD,EDIDC,EDIDS structure you can write a coding to populate the segment.mostly the function module used to populate the segment.i think depends upon the output type you can populte the segment

Read only

ferry_lianto
Active Contributor
0 Likes
1,767

Hi Joseph,

Which message and IDoc type are you dealing with?

Is it for inbound or outbound process?

Regards,

Ferry Lianto

Read only

ferry_lianto
Active Contributor
0 Likes
1,767

Hi Joseph,

I assume you are using standard FM IDOC_INPUT_ORDERS to generate IDoc.

If you are, then inside the FM there is user exits to modify/add segment for E1EDPT2.

CALL CUSTOMER-FUNCTION '001'
    EXPORTING SEGMENT = IDOC_DATA
              DVTCOMAG = VTCOMAG
              DXMESCOD = IDOC_CONTRL-MESCOD
              CONTRL   = IDOC_CONTRL
    TABLES    DXBDCDATA = BDCDATA
              DXVBAP    = XVBAP
              DXVBEP    = XVBEP
              DYVBEP    = YVBEP
              DXVBADR   = XVBADR
              DYVBADR   = YVBADR
              DXVBPA    = XVBPA
              DXVBUV    = XVBUV
              DD_FLAG_P = D_FLAG_P
              DXKOMV    = XKOMV
              DXVEKP    = XVEKP
              DYVEKP    = YVEKP
    CHANGING  DXVBAK   = XVBAK
              DD_FLAG_K = D_FLAG_K
    EXCEPTIONS
              USER_ERROR = 01.

Hope this will help.

Regards,

Ferry Lianto

Please reward points if helpful.

Read only

0 Likes
1,767

Hi Lianto,

thank you very much for your kind help.

I have modified the Standard FM IDOC_INPUT_ORDERS and using it.

now should i call the customer-function in my function module's source code itself ??

pls clarify . May i have ur alternative email id ?

Thanks & Regards,

Joseph.

Read only

ferry_lianto
Active Contributor
0 Likes
1,767

Hi Joseph,

If you want to use the user exits as mentioned above,

you don't need to modify the standard FM IDOC_INPUT_ORDERS. Any specific reason?

You just need to activate the include program inside the user exits and place your logic there.

Don't get me wrong, please use this forum as communication and verification. In this case, all SDNer can learn and share valuable information. Also they will provide you any input and solution (from different point of view). This is one of the resources.

Again, let me know if you need further assistant.

Regards,

Ferry Lianto

Read only

0 Likes
1,767

Hi Lianto,

i have modified the standard FM for some other reasons,

now i found the customer-funtion '001' is having a inlcude programe ZYDC_VEDAU03, and this include program is not having code in it,

should i place my logic here in this include programe ?

i am passing the value which should be updated to Additional text field from my FM thru' a memory id,

can i use the same here ?

pls guide me in this .

Thanks & Regards,

Joseph

Read only

ferry_lianto
Active Contributor
0 Likes
1,767

Hi Joseph,

I assume an include program ZYDC_VEDAU03 is correct then absolutely you can place your logic/codes inside the include program.

Please check whether the customer-funtion '001' has import parameter for IDOC_DATA (Segment) or not.

If it has then you can code something like this.

DATA: ZE1EDPT2 LIKE E1EDPT2.

LOOP AT IDOC_DATA.
  CASE IDOC_DATA-SEGNAM.
     WHEN 'E1EDPT2'.
       MOVE IDOC_DATA-SDATA TO ZE1EDPT2.

       ZE1EDPT2-TDLINE   = <...>    <- import from memory id
       ZE1EDPT2-TDFORMAT = <...>    <- import from memort id

       MOVE ZE1EDPT2 TO IDOC_DATA-SDATA.
       MODIFY IDOC_DATA.

     WHEN <...>

     OTHERS.     

   ENDCASE.
ENDLOOP.

At the end, ensure you activated.

Hope this will help.

Regards,

Ferry Lianto

Please reward points if helpful.

Read only

0 Likes
1,767

Hi Lianto,

i want to modify this idoc segment to update the additional text field in Sales order , let me clearly explain you what i want,

We receive IDOC from Biztalk to post a sales order,

in that , we have some materials defined as Include Items, we don't want to display this items in sales order, this include items belongs to some other material in the same idoc, for our understanding i can say parent - child relationship.

Include items will have Action as '003' and Reason for rejection as 'Y9', it will have its parents material's item no in its shipping to field. now in sales order i have to remove the items which are having action as 003, and have to place this material in its parent material.

Hope you understand my requirement now,

can you suggest me the solution for this ??

Thanks & Regards,

Joseph

Read only

former_member404244
Active Contributor
0 Likes
1,767

Hi joseph,

what ever lianto has given.its correct.See when ur using any inbound idoc .It will come with data.Now when the parent segment comes the data will be there in idoc_data-sata..

So u an use the code .So write the code which you want to

modify..

for example iam getting some ISO code i want to midfy to sap code.

so what i will do is as i have data in idoc_data-sdata,

i will move to some workarea and then write the code to modify the iso code and then i will modify the idoc_data.

so now the idoc_data-sdata will have modified values not the values which has come.

Regards,

Nagaraj

Read only

0 Likes
1,767

Hi Nagaraj,

i have tried the same

but i couldn't get the result.

Earlier i modified the mateiral based on Customer material no in idoc segments E1EDP01 and E1EDP19, then i had modified it in the XVBAP also, so i got the modified matnr in my sales order,

Now i have modified the idoc data, and after that to get it in my sales order what should i do ?

i want this in my sales order item's additional text,

how to do this ?

regards,

Joseph