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

Changing value after using ASSIGN statement

Former Member
0 Likes
1,382

Hello!

I'm working on a display issue we're having in VF01. The issue is that VBRP-WAVWR needs to store a cumulative value but in the initial screen of VF01 it does not have the values so a 0.00 is displaying in the Cost column. In a calculation type we are using this command to pull the data from VBRP:

ASSIGN ('(SAPMV60A)XVBRP[]') TO <fs_xvbrp>.

Is there a way to change the values in the XVBRP[] table? Could I use the MOVE command or something else? My thought is that after I get all the values I could go back and change the value of WAVWR in the table.

Thanks,

Wendy

4 REPLIES 4
Read only

Former Member
0 Likes
1,218

hi,

when you do an assign you can change the values in the field-symbol and they are reflected in the tables/variable that you had assign.

Read only

tushar_shukla
Active Participant
0 Likes
1,218

Wendy,

It is not recommended to change the variables outside their scope. You should look for appropriate exit/badi/enhancement for your requirement.

Refer the following blog and its comments, you will have better idea why we should not change the variables outside their scope

/people/david.halitsky/blog/2009/01/28/i-want-my-money-back-for-bc425u-or-do-i

Read only

brad_bohn
Active Contributor
0 Likes
1,218

You don't need to use a field symbol though. That approach is used to read values from memory for requirements and calculation routines when all of the necessary values can't or aren't provided in a KOM* structure. It's not soemthing you would use in the main invoice overview screen. Why isn't there a cost in the invoice line item? Has the delivery been PGI'd and costs calculated (can you invoice before PGI in your scenario)? What does LIPS-WAVWR contain? Is the value just not copying over? Are you re-calculating, either in copy control or in the invoice itself, and it's not being displayed in the main screen?

Read only

Former Member
0 Likes
1,218

Thanks for the help! I pull the lines from the LIPS table and update the VBRP table with the cost.

This issue came up because we have done some custom coding around BOMs and the cost from the components needs to roll up and be applied at the header. When VF01 is first accessed it processes top-down so the BOM header does not have the information of the components so I had to code so when the components were processing to go back and updated the BOM Header.