05-04-2007 7:48 AM
Please explain this code.
Loop at cs_postab.
select single * from likp where vbeln eq cs_postab-vbeln.
cs_postab-sdabw = likp-sdabw.
Modify cs_postab.
endloop.
Thanks,
sairam
05-04-2007 7:54 AM
Hai,
You r getting the Special processing indicator(SDABW) value using Delivery(VBELN) Value from the Table LIKP & using this VBELN u r updating the values of SDABW in cs_postab.
Regards,
Padmam.
05-04-2007 7:52 AM
There is an internal table called cs_postab.
It has a certain structure with one field as vbeln (sales order number)
and another field sdabw which maybe curently empty.
By looping at the table, we are taking each record at a time, checking its vbeln and using it to read data from LIKP table. Once we have read the data, we fill up the sdabw field of the current row.
Loop at cs_postab. " the work area is a header line
select single * from likp where vbeln eq cs_postab-vbeln. " getting data for the current sales order.
cs_postab-sdabw = likp-sdabw.
Modify cs_postab.
endloop.
Hope this helps
05-04-2007 7:52 AM
Hi,
This codes are used to modify sdabw field ot cs_postab from likp db table value.
this uses loop and changes values of itab accordingly
Jogdand M B
05-04-2007 7:53 AM
Hi sairam,
From your Code,
1. you had selected the all fields from LIKP table where the fields LIKP-VBELN and CS_POSTB - VBELN.
2. Then, assign the value of field likp-sdabw into cs_postab-sdabw.
3. Now you are update the Internal table cs_postab using Modify statement.
Thanks.
Reward If Helpful.
05-04-2007 7:54 AM
Hai,
You r getting the Special processing indicator(SDABW) value using Delivery(VBELN) Value from the Table LIKP & using this VBELN u r updating the values of SDABW in cs_postab.
Regards,
Padmam.
05-04-2007 7:54 AM
this code modifies the internal table cs_postab with the value sdabw by getting it from the table LIKP.
Loop at cs_postab. <b>" for every value of cs_postab-vbeln</b>
select single * from likp where vbeln eq cs_postab-vbeln. <b>" selects the respective record frm LIKP matching the VBELN</b>
cs_postab-sdabw = likp-sdabw. <b>"write the value sdabw from LIKP to the internal table cs_postab</b>
Modify cs_postab. <b>"modififies the internal table</b>
endloop.
Regards
Gopi
05-04-2007 8:03 AM
Hi Sairam,
Loop at cs_postab.
( Looping the cs_postab table )
select single * from likp where vbeln eq cs_postab-vbeln.
( selecting a single row from likp table if it
vbeln in that row is equal to cs_postab-vbeln. )
After selecting a record which satisfy the above condition
Now u r modifying the cs_postab table sdabw record
with likp table sdabw record.
( i.e, assigning the selected likp-sdabw record to
postab-sdabw record )
cs_postab-sdabw = likp-sdabw.
Modify cs_postab.
( this code wil save the modified record
in cs_postab.)
I hope u got it.
<b>Reward for useful answers.</b>
05-04-2007 8:54 AM
Thanks for all replies.
Iam giving bonus points to all.
Thanks & Regards,
sairam
05-04-2007 8:59 AM
Hi Sairam,
U r modifying field sdabw to ur internal table cs_postab on the basis of vbeln that exist in this internal table from LIKP.
Reward points if helpful.
Regards,
Hemant
05-04-2007 10:28 AM
Loop at cs_postab. <i><b>to run for every entry in the internal table cs_postab</b></i>
select single * from likp where vbeln eq cs_postab-vbeln. <i><b>single row with all the fields of the table likp will be selected, based on the condition likp- vbeln should be equal to cs_postab-vbeln</b></i>
cs_postab-sdabw = likp-sdabw. <i><b>from the selected row the field sdabw of internal table cs_postab will be assigned from lidp - sdabw field</b></i>
Modify cs_postab.<i><b> the current row of the internal table cs_postab that is read through the loop will be updated with the value of the field sdabw</b></i>
endloop. <i><b>once all the records of the table cs_postab is read it will end the loop.</b></i>