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

Assign value to other variable's value.

keyur_pawar
Active Participant
0 Likes
1,272

Hello friends,

Here I'm getting stuck.

I have a variable LV_POSNR & at runtime LV_POSNR filled by some value suppose say 'VBAP-POSNR(01)'.

it means LV_POSNR has value 'VBAP-POSNR(01)'.

But here my requirement is I wants to assign some new value to VBAP-POSNR(01).

means suppose say VBAP-POSNR(01) = 00010.

So how can I assign value to other variable's value at runtime.

Regards,

Keyur.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,226

Hi,

Question is not clear, please explain. Also is it something related to table control in bdc recording ?

Hello friends,

Here I'm getting stuck.

I have a variable LV_POSNR & at runtime LV_POSNR filled by some value suppose say 'VBAP-POSNR(01)'.

it means LV_POSNR has value 'VBAP-POSNR(01)'.

But here my requirement is I wants to assign some new value to VBAP-POSNR(01).

means suppose say VBAP-POSNR(01) = 00010.

So how can I assign value to other variable's value at runtime.

Regards,

Keyur.

7 REPLIES 7
Read only

Former Member
0 Likes
1,227

Hi,

Question is not clear, please explain. Also is it something related to table control in bdc recording ?

Read only

0 Likes
1,226

Hi Ankit,

It is related to Table control in Module pool (not BDC).

Here I getting table control field VBAP-POSNR(03) in variable LV_POSNR at runtime.

Now I want to assign '00010' value to VBAP-POSNR(03).

Regards,

Keyur

Read only

0 Likes
1,226

Hi Keyur,

Try doing screen programming. It works for individual fields though i have not tried it for table control fields but i think only differentiator would be index here.

Ex -

field-symbols <fs_kdmat> type any.

constants lc_kdmat type char50 value '(SAPMV50A)LIPS-KDMAT'.

Assign (lc_kdmat) to <fs_kdmat>.

Replace '(SAPMV50A)LIPS-KDMAT' => '(SAPMV50A)LIPS-KDMAT(03)'.

Make the index dynamic using a counter variable.


Read only

0 Likes
1,226

Hi Pawar,

can you explain , are you working on customized module pool or standard?.

you can give value using update screen fields function module.

Regards,

Hiriyappa.

Read only

0 Likes
1,226

Hi Hiriyappa,

Yes off course, I can use Dynpro Update FM. But it is not working properly.

when I use this FM that time my value get updated but remaining screen's value getting Flushed & no one control or pushbutton works (not even BACK or EXIT button).

Read only

0 Likes
1,226

Hi, Ankit,

here in this case, I get '(SAPMV50A)LIPS-KDMAT(03)' in <fs_kdmat>.

But How to assign new value to (SAPMV50A)LIPS-KDMAT(03).

Read only

0 Likes
1,226

Change the value in <fs_kdmat> and automatically the screen field value will change.

BR.