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

Add custom line item in va01 tcode automatically

palash_mazumder
Participant
0 Likes
1,481

Hi Expert ,

I have a requirement when create sales order user want to get the line item data based on some condition.That's mean user do not fill the line item data manualy. It will fill automatically .Actually the line item is a table control

Please help me.

Hi Expert ,

I have a requirement when create sales order user want to get the line item data based on some condition.That's mean user do not fill the line item data manualy. It will fill automatically .Actually the line item is a table control

Please help me.

4 REPLIES 4
Read only

Former Member
0 Likes
1,140

Please elaborate your condition for filling the line item automatically if possible, meanwhile u can search for any BADI's which will serve your purpose.

Read only

Former Member
0 Likes
1,140

Well Palash,

There is only 1 place where you can achieve this to my knowledge...

MV45AFZZ.

In

  • USEREXIT_MOVE_FIELD_TO_VBAK


append the XVBAP[] table with the entry you want... I am not sure if it will work but you can give it a try as I have never worked on this kind of requirement.

Also be sure to create a Flag in memory once you have added the entry use IMPORT  / EXPORT.

First Import if you get the value that means you have already added an entry in VBAP so skip it. else process and export the value in memory so it reads in next import.

Regards

Read only

0 Likes
1,140

Hi ,

Actually I have implemented two enhancement in

module tctrl_u_erf_auftrag_init. and

module xvbap_lesen.

here module xvbap_lesen inside a table control  tctrl_u_erf_auftrag.

and default it is shown three line item.but i want to generate two line item from my internal table.

I have used memory id to pass the data. But unable to display two line item.I have given the screen shot.

The data from material coming from enhancement.Here showing three line item.My requirement is

showing two material number.

Read only

0 Likes
1,140

Hi,

I have solved it. By control the loop by

if tctrl_u_erf_auftrag_current_line <=2 in module xvbap_lesen. and populate the corressponding

field in table cotrol inside if block.