Application Development 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: 

To populate Segment data to Order item level in additional tab B

Former Member
0 Kudos

Hi Experts,

I am working on Inbound interface using IDoc (ORDERS05); during Idoc process IDOC_ORDERS_INPUT; i have to take segment value and need to populate at order items level; in custom field (in additional tab B).

For that i am using FM (Customer exits) :

Step 1- EXIT_SAPLVEDA_001 (Getting segment value and passing to XVBAP-Zfield).

Step 2- EXIT_SAPLVEDA_002 (Passing Value to respective screen using BDCDATA table).

Due to unable to find where i have to set flag and how ?; To avoid multiple record to append ; BDCDATA Table with same screen.

As mention in this link for Header level additional tab B : http://www.sapfans.com/forums/viewtopic.php?f=21&t=62945#p1025880.

They are using my_flag to avoid ,issue as i mention in above step.

Step 3 - At last they are deleting my_flag in FM : EXIT_SAPLVEDA_003. (find in above link)

Thanks in Advance

Regards

Vinay

4 REPLIES 4

Former Member
0 Kudos

you need to use a flag of type vbap-posnr .

and your check statement will become

check my_flag NE XVBAP-POSNR. (or the ZZXVBAP-POSNR).

and setting the flag

my_flag = XVBAP-POSNR.

so for same posnr it wont repeat the append.. hope this can help

0 Kudos

Thanks Soumyaprakash for quick response.

I am concearn about my_flag, would be local variable for respective FM : EXIT_SAPLVEDA_002; then how i would be clear this variable in another i.e FM: EXIT_SAPLVEDA_003.....as mention in the above link example.

Regards

Vinay

0 Kudos

oh i thought the example which you refered already told you about whre you are defining that variable i was thinking that as well..

you can use a unused filed in xvbak and clear it after every thing is done..

you can use a memory id (export / imprort to read the value and set the value)..

and you can very well go for a STATICS declaration of the variable if you want to..

eduardo_hinojosa
Active Contributor
0 Kudos

Hi

See this [post|;. See also Note 753153 - FAQ: Customer-functions in IDOC_INPUT_ORDERS.

I hope this helps you

Regards

Eduardo