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

Sales order header text

Former Member
0 Likes
4,833

Hi All,

We have sales order created through a inbound 850 idoc. Now I have to add header text on sales order when it is created for E1EDK03 003 - DATUM, E1EDK03 004 - DATUM and E1EDK01 - ZTERM. How can get this information from 850 and display it on to sales order header text.

Thanks,

Veni.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
4,398

easiest would be to take a user exit in IDOC_INPUT_ORDERS, read the segment you want the data from, and add an E1EDKT1 and E1EDKT2 segments there

further looking use custome function 009 in the function module, and add the text segemtns there based on your values



  CALL CUSTOMER-FUNCTION '009'
       EXPORTING
         docnum        = idoc_contrl-docnum
         xinput_method = input_method
       TABLES
         dbdcdata      = bdcdata
         derrtab       = errtab
         dxvbap        = xvbap
         dxvbep        = xvbep
         dxvbadr       = xvbadr
         dxvbpa        = xvbpa
         dxvbuv        = xvbuv
         dedidc        = idoc_contrl
         dedidd        = idoc_data
         dd_flag_p     = d_flag_p
         dxkomv        = xkomv
         dxvekp        = xvekp
         dyvekp        = yvekp
         dxe1edkt2     = xe1edkt2
         dxe1edpt2     = xe1edpt2
       CHANGING
         dd_flag_k     = d_flag_k
         dxvbak        = xvbak
         xwldat        = wldat
         dd_flag_v_vekp = d_flag_v-vekp
      EXCEPTIONS
            USER_ERROR = 01.

Edited by: MxG on Nov 10, 2008 12:21 PM

Hi All,

We have sales order created through a inbound 850 idoc. Now I have to add header text on sales order when it is created for E1EDK03 003 - DATUM, E1EDK03 004 - DATUM and E1EDK01 - ZTERM. How can get this information from 850 and display it on to sales order header text.

Thanks,

Veni.

29 REPLIES 29
Read only

Former Member
0 Likes
4,399

easiest would be to take a user exit in IDOC_INPUT_ORDERS, read the segment you want the data from, and add an E1EDKT1 and E1EDKT2 segments there

further looking use custome function 009 in the function module, and add the text segemtns there based on your values



  CALL CUSTOMER-FUNCTION '009'
       EXPORTING
         docnum        = idoc_contrl-docnum
         xinput_method = input_method
       TABLES
         dbdcdata      = bdcdata
         derrtab       = errtab
         dxvbap        = xvbap
         dxvbep        = xvbep
         dxvbadr       = xvbadr
         dxvbpa        = xvbpa
         dxvbuv        = xvbuv
         dedidc        = idoc_contrl
         dedidd        = idoc_data
         dd_flag_p     = d_flag_p
         dxkomv        = xkomv
         dxvekp        = xvekp
         dyvekp        = yvekp
         dxe1edkt2     = xe1edkt2
         dxe1edpt2     = xe1edpt2
       CHANGING
         dd_flag_k     = d_flag_k
         dxvbak        = xvbak
         xwldat        = wldat
         dd_flag_v_vekp = d_flag_v-vekp
      EXCEPTIONS
            USER_ERROR = 01.

Edited by: MxG on Nov 10, 2008 12:21 PM

Read only

0 Likes
4,398

HI MxG,

Thank you.

I went to SPRO to add Text Id's, I choosed Sales Document -> Header -> Sales Header -> Text Id's in Textprocedure. Here in new entries how should I give Seq no, ID and Access Seq. Do I have to just give the next available num or do I have to create these some where else.

Please help me.

Thanks,

Veni.

Read only

0 Likes
4,398

seems your config itself was not done. once you complete that, and include the text id in the text procedure, refer to that id in the user exit to populate that segment

Read only

0 Likes
4,398

HI MxG,

Where should I create TextId. Should I create under VBBK? And also where should I create AccessSeq.

Thanks,

Veni.

Read only

0 Likes
4,398

Hi,

I created Text Id's using SE75. Can you please let me know how to create Access Sequence?

Thnaks,

Veni.

Read only

0 Likes
4,398

Hi All,

Can someone please help me.

Thanks,

Veni.

Read only

0 Likes
4,398

Do you have a functional person repsonsible for maintaining the cofnig, if yes, i woudl prefer you to go to him, as you are not aware of the access sequences, and text determination procedure being used in your orders. if you arenot responsible for doing it normally driect it to the correct person.

But in case you are the one, open the question or move this thread to SD forum. i can reply there or someone else may even pick it up before me.

Read only

0 Likes
4,398

Hi MxG,

I was able to add Text Id and Access Seq. Now i am working on getting the new data of 850 IDOC on sales order header text.

Thanks,

Veni.

Read only

0 Likes
4,398

Good, come back if you have further questions

Read only

0 Likes
4,398

Hi All,

I wrote the following code but the text is not showing up in the header text. Is there anything wrong with my code. Please help.

Thanks,

Veni.

WHEN 'E1EDK03'.

MOVE SEGMENT-SDATA TO E1EDK03.

IF E1EDK03-IDDAT = '004'.

WRITE E1EDK03-DATUM TO PSDATE.

CLEAR: wa_thead, itline.

REFRESH: itline.

  • wa_thead-tdname = sales_document.

wa_thead-tdobject = 'VBBK'.

wa_thead-tdid = '0021'.

wa_thead-tdspras = sy-langu.

itline-tdformat = '*'.

itline-tdline = PSDATE.

APPEND itline.

CALL FUNCTION 'SAVE_TEXT'

EXPORTING

client = sy-mandt

header = wa_thead

insert = 'X'

savemode_direct = 'X'

TABLES

lines = itline.

Read only

0 Likes
4,398

Hi,

I am getting following error. Can anyone please help me.

I/O error for text VBBK 0021 EN

Diagnosis

You want to read a text from the database, delete it, or save it to the database.

System Response

An error occurred when the database was accessed.

Procedure

Try repeating the procedure. If the error recurs, contact your system administrator.

Thanks,

Veni.

Read only

0 Likes
4,398

Thanks.

Read only

0 Likes
4,398

Where are you wrting this code?

Read only

0 Likes
4,398

>

> Thanks.

please mark appropriately as i can see MxG is continuing following your problem.

That is the right way to say thanks on SCN.In this manner we often encourage ourself .

Please understand the motive and values of SCN.

Read only

0 Likes
4,398

Sorry. Thought I may have to open a new thred and with error from function module and opened another one.

I really appriciate all your help from SDN.

This site is very helpful.

Thanks,

Veni.

Read only

0 Likes
4,398

>

> Sorry. Thought I may have to open a new thred and with error from function module and opened another one.

wait Wait wait....

dont open new thread ..you can continue with this thread only.

Read only

0 Likes
4,398

Hi MxG and all,

We have a include for Customer Function 001 and I am writing the code in that include file.

I think may be I am not passing Tdname properly.

I debuged it and Tdline has Period Start Date in it.

Are there any other fields I missed to populate in my code.

Can someone please help me.

Thanks,

Veni.

Read only

0 Likes
4,398

Which program is that? As I mentioned above you dont need to call SAVE_TEXT in IDOC processing. In customer function 009 you need to populate xe1edpt2 segment properly with TDID, and your text, and SAp will take care of it by itself,.

if you want to call SAVE_TEXT use CUSTOMER-FUNCTION '004', which will have the Sales order#, and the IDOC data to be consumed in your code

Read only

0 Likes
4,398

Hi MxG,

How do I find out the CUSTOMER-FUNCTION for one of the include we have, which has Save_text to display item text. How can I see CUSTOMER-FUNCTION, I went to SE37 but it does not have this one.

Thanks,

Veni.

Read only

0 Likes
4,398

thats what I was asking which program is that. if its in IDOC_INPUT_ORDERS try ZXVEDU03 program that will have your code

in SE37 it will be EXIT_<main program name>_001

Read only

0 Likes
4,398

Hi MxG,

Found them. I used EXIT_SAPLVEDA_001 and it has include ZXVEDU03. I wrote my code here in the include ZXVEDU03.

The include with item text which has Save_text is EXIT_SAPLVEDA_003 - INCLUDE ZXVEDU05.

Thanks,

Veni.

Read only

0 Likes
4,398

Hi MxG,

EXIT_SAPLVEDA_009 has include ZXVEDU11 and it has some code. EXIT_SAPLVEDA_004 has include ZXVEDU06 and it is not created.

Can you please give me an example on how to use this in EXIT_SAPLVEDA_009 or EXIT_SAPLVEDA_004.

Thanks,

veni.

Read only

0 Likes
4,398

try moving your code to customer function 004 include ZXVEDU06. I think the issue is that yoru slaes order is still not committed in database when you are calling save_text. fucntion 003 is before commit work, so thats definitely not goin gto work, but you can try 004.

thats why I asked you to use customer fucntion 009, and populate ze1edpt2 only then let SAp populate that

Read only

0 Likes
4,398

Hi MxG,

How can I create the include ZXVEDU06. I went to se38 to create it, but it is not allowing me to create it.

This is the first time I am working with displaying texts on Orders, I did not know much of Customer Functions before and thats why scared to touch ZXVEDU11 as I did not want to mess up with other data.

I really learned so much related to this texts now. Thank you MxG.

Thanks,

Veni.

Read only

0 Likes
4,398

ideally you should go via EXIT_SAPLVEDA_004, doubleclick there, and then doubleclik on the program name, ignore the warning by pressing enter.

Read only

0 Likes
4,398

Veni,

Okay np probs if you are newbie with Exits.

we all were new at some time.

you can take help from FM IDOC_INPUT_ORDERS and search with term CALL CUSTOMER-FUNCTION '004' here you can see the example how this customer function has been implemented and what parametes you suppose to pass.

Read only

0 Likes
4,398

Hi MxG and Amit,

I am able to add one text on the order header texts. I will update you once I am done with the remaing two more texts.

I really appriciate all your help.

Regards,

Veni.

Read only

0 Likes
4,398

Hi MxG and Amit,

I am very happy to let you know that finally I displayed 3 texts on order header texts. I am very very thankful to all your help.

Regards,

Veni.

Read only

0 Likes
4,398

good that it worked out.