‎2010 Jun 29 7:24 AM
Hello all ,
I'm writing a code in the badi implementation . The badi is /SAPSLL/CTRL_MM0C_R3 . this badi contains a metthod API_CONTROL_MODIFY.This badi triggers while using MIGO transaction .
It is having the following parameter .
IT_MSEG Importing Type SLLR3_MSEG_T .
SLLR3_MSEG_T is declared as follows.
TYPES: sllr3_mkpf_t LIKE mkpf OCCURS 0,
sllr3_mseg_t LIKE mseg OCCURS 0.
here i have to get the werks value that is populated into IT_MSEG whie doing MIGO .
I have declared a local variable and assigned werks value from the IT_MSEG to the local variable as follows
DATA:l_werks type werks.
l_werks = IT_MSEG-WERKS.
But I'm getting the following error.
"IT_MSEG" is a table without a header line and therefore has no
component called "WERKS".
How should i avoid this error. Please give me sample code on how to avoid this error.
thanks in advance
pavan
‎2010 Jun 29 7:31 AM
Hi,
Move the row from IT_MSEG into a work area and use it. Declare the workarea of required type.
DATA:l_werks type werks.
read table it_mseg into wa_mseg index 1.
l_werks = wa_MSEG-WERKS.Regards
Vinod
‎2010 Jun 29 7:29 AM
Hi,
In Badi Occurs 0 will not support. you need to create the Struture first and then create the table according to that structure and the work area for that structure.
Then do the coding .
Hope this might help you to solve your problem.
With Regards,
Sumodh.P
‎2010 Jun 29 7:31 AM
Hi,
Move the row from IT_MSEG into a work area and use it. Declare the workarea of required type.
DATA:l_werks type werks.
read table it_mseg into wa_mseg index 1.
l_werks = wa_MSEG-WERKS.Regards
Vinod