2014 Apr 22 6:48 AM
Hi,
I am changing pricing routing RV61A902.
While debugging I come accross structure (SAPLIPWI)RIPWO of standard program SAPLV61A.
Basically I want to use value of field SERNR of the structure (SAPLIPWI)RIPWO in my coding.
But i dont know how to use this value ?
I tried to use like below , but getting error
FIELD-SYMBOLS : <fs_sernr> type any.
assign (SAPLIPWI)RIPWO-sernr to <fs_sernr>.
Can u pls help in this ??
Regards,
2014 Apr 22 6:53 AM
Hi,
what error ar you getting.
Try definig the type for field symbol.
FIELD-SYMBOLS : <fs_sernr> type of RIPWO.
constant: field(30) type c value '(SAPLIPWI)RIPWO'.
assign field to <fs_sernr>.
if <fs_sernr> is assigned.
<fs_sernr>-sernr = .....
endif.
Regards
Sree
Hi,
I am changing pricing routing RV61A902.
While debugging I come accross structure (SAPLIPWI)RIPWO of standard program SAPLV61A.
Basically I want to use value of field SERNR of the structure (SAPLIPWI)RIPWO in my coding.
But i dont know how to use this value ?
I tried to use like below , but getting error
FIELD-SYMBOLS : <fs_sernr> type any.
assign (SAPLIPWI)RIPWO-sernr to <fs_sernr>.
Can u pls help in this ??
Regards,
2014 Apr 22 6:53 AM
Hi,
what error ar you getting.
Try definig the type for field symbol.
FIELD-SYMBOLS : <fs_sernr> type of RIPWO.
constant: field(30) type c value '(SAPLIPWI)RIPWO'.
assign field to <fs_sernr>.
if <fs_sernr> is assigned.
<fs_sernr>-sernr = .....
endif.
Regards
Sree
2014 Apr 22 7:22 AM
I have put code as below : but getting error "Type RIPWO is unknown"
FIELD-SYMBOLS : <fs_sernr> type RIPWO.
constant: field(30) type c value '(SAPLIPWI)RIPWO'.
assign field to <fs_sernr>.
if <fs_sernr> is assigned.
endif.
2014 Apr 22 7:28 AM
Hi,
Below code will help you.
FIELD-SYMBOLS : <fs_sernr> type any.
assign ('(SAPLIPWI)RIPWO') to <fs_sernr>.
IF <fs_sernr> IS ASSIGNED.
<fs_sernr>-sernr will hold the value.
ENDIF.
Regards
Gangadhar
2014 Apr 22 10:18 AM
I used code by gangadhar as below. but i am not able to use value of <fs_sernr>-sernr
it gives error "the data object <fs_sernr> has no structure and therefore no component called "SERNR".
FIELD-SYMBOLS : <fs_sernr> type any.
data : lv_obknr type OBJKNR,
lv_LIEF_NR type VBELN_VL,
lv_vbeln type VBELN_NACH.
assign ('(SAPLIPW1)RIPW0') to <fs_sernr>.
IF <fs_sernr> IS ASSIGNED.
clear lv_obknr.
select single OBKNR
into lv_obknr
from OBJK
where EQUNR = <fs_sernr>-sernr
and TASER = 'SER01'.
if lv_obknr is not INITIAL.
clear lv_LIEF_NR.
select single LIEF_NR
into lv_LIEF_NR
from SER01
where OBKNR = lv_obknr.
if lv_LIEF_NR is not INITIAL.
select single vbeln
into lv_vbeln
from vbfa
where VBELV = lv_LIEF_NR
and POSNV = '000010'
and VBTYP_N = 'U'.
endif.
endif.
ENDIF.
2014 Apr 22 10:39 AM
Hi,
Can i knw your actual internal table....
field-sybols : <f> type (your internal table type).
loop at it assinging <f>.
<f>-sernr = (your value).
endloop.
2014 Apr 22 11:32 AM
your field-symbol is untyped (any). That means you can't access the field of the structure directly like this:
structure-field
you need to access it via another field-symbol, like you already did, so
assign component 'SERNR' of structure 'STRUCTURE' to <lv_any2> and then use this <lv_any2> in your where clause
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |