on 10-19-2006 10:35 AM
Hi..
I need to update a user field in co01. I ws able to get the material i wanted to display on the user field through this code.
DATA : material like CAUFVD-matnr.
FIELD-SYMBOLS: <F> TYPE CAUFVD-matnr.
assign ('(SAPLCOVF)CAUFVD-matnr') to <F>.
If SY-SUBRC = 0.
material = <F>.
endif.
now i want to assign this to
(SAPLCOVF)AFVGD-USR00 ..
The exact opposite of wht i do in the above code. But the problem is how do u define a screen field in FIELD-SYMBOL.
i tried
FIELD-SYMBOLS: <F1> LIKE SAPLCOVF(AFVGD-SLWID).
But tht doesn't work?? Cn anyone help pls? Tnx
Keshi
Try :
FIELD-SYMBOLS: <F1> type AFVGD-SLWID.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi.. Tnx for replying..
The problem when giving it like that is that its just another field symbol frm a structure, and not the exact screen field..
Just like i gt the value frm the screen by giving assign ('(SAPLCOVF)CAUFVD-matnr') to <F>, i want to now assign this value to another different field which is displayed in the CO01.
When i just assigned it to afvgd-slwid it wouldnt get updated on the screen.. Any idea??
Thanks Max..
I finally feeel as if i'm getting somewhr with this..
But it still didn't work.. The exact code i wrote tnx to u ws,
DATA : material like CAUFVD-matnr,
USR00 LIKE AFVGD-USR00,
SLWID LIKE AFVGD-SLWID.
FIELD-SYMBOLS: <F> TYPE CAUFVD-matnr,
<F1> TYPE AFVGD-SLWID,
<F2> TYPE AFVGD-USR00.
DATA: FIELDNAME1(30) VALUE '(SAPLCOVF)CAUFVD-MATNR',
FIELDNAME2(30) VALUE '(SAPLCOVF)AFVGD-USR00',
FIELDNAME3(30) VALUE '(SAPLCOVF)AFVGD-SLWID'.
assign (FIELDNAME1) to <F>.
If SY-SUBRC = 0.
material = <F>.
endif.
assign (FIELDNAME3) to <F1>.
If SY-SUBRC = 0.
<F1> = '0000001'.
endif.
assign (FIELDNAME2) to <F2>.
If SY-SUBRC = 0.
<F2> = <F>.
endif.
whn i debugged the code, the values appeared for <F2> and <F1>, but it doesnt appear on the screen, when i checked with the transaction CO02.. The field that should have been updated, is still blank.. Any idea? Tnx a lot..
Hi
DATA : material like CAUFVD-matnr,
<b> USR00 LIKE AFVGD-USR00.</b>
<b>* FIELD-SYMBOLS: <F> TYPE CAUFVD-matnr.</b>
FIELD-SYMBOLS: <F> TYPE ANY.
DATA: FIELDNAME1(30) VALUE '(SAPLCOVF)CAUFVD-MATNR',
FIELDNAME2(30) VALUE '(SAPLCOVF)AFVGD-USR00'.
assign (FIELDNAME1) to <F>.
If SY-SUBRC = 0.
material = <F>.
endif.
assign (FIELDNAME2) to <F>.
If SY-SUBRC = 0.
USR00 = <F>.
endif.
Max
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
6 | |
5 | |
5 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.