2008 Jul 01 8:43 AM
Hi,
I am implementing a BADI, the interface has a TABLE type parameters (changing). i checked the data in debug mode in this TABLE. how do i read this contents in my BADI code.
Thanks
Akila. R
Hi,
I am implementing a BADI, the interface has a TABLE type parameters (changing). i checked the data in debug mode in this TABLE. how do i read this contents in my BADI code.
Thanks
Akila. R
2008 Jul 01 8:46 AM
2008 Jul 01 8:46 AM
hi,
Assume internally if the table name is t_vbak....do this way ...
Changing
t_vbak type vbak
loop at itab.
read table t_vbak with key vbeln = itab-vbeln.
if sy-subrc = 0.
endif.
endloop.
2008 Jul 01 8:47 AM
Use the SELECT statement to read the data into an internal table and then pass that internal table as a parameter.
2008 Jul 01 8:48 AM
hi,
define a table type and use it.
check this sample code.
here cjbai_wbselement_table is structure in badi WORKBREAKDOWN_UPDATE.
data: wa_prps type line of cjbai_wbselement_table,
wa_prhi type line of cjbai_wbshierarchy_table.
read table it_wbs_element into wa_prps index 1.
if wa_prps-stufe = 1 or wa_prps-stufe = 2 .
message '1Your not able to create WBS element
upto 3rd level' type 'E'.
endif
2008 Jul 01 8:49 AM
Hi ,
u need to read data into work area.
sample code .
changing table is CT_MARA.
data: lt_mara like line of ct_mara.
loop at ct_mara into lt_mara.
do nothing.
endloop.
regards
Prabhu
2008 Jul 01 8:52 AM
I think the TABLE parameter is unknown, the table name will be known only at run time, so when i use READ TABLE <table parameter>.... WITH KEY GUID = '', it gives error that GUID is unknown.
Thanks
Akila. R
2008 Jul 01 9:01 AM
hi,
Dont directly us the key name , as the table is dynamic , u shud use the key name also as dynamic.
data: fld(4) type c value 'GUID'.
READ TABLE <table parameter>.... WITH KEY fld = ''.
this will read the Key only at runtime and ur error will be removed.
revrt back if any issues.
regards,
Naveen
2008 Jul 01 9:15 AM
Hi
we can do it in two ways:
1. By using read statement.
2. By using internal tables: In this we can first select the data from database table to internal table using select statement, and then process the data.
thanks & regards,
Rajesh Kumar
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |