‎2008 Aug 19 4:42 AM
Hi
Modify statement going to dump in below coding. pls help me
loop at it_vbrp.
READ TABLE it_lips WITH KEY vbeln = it_vbrp-vgbel BINARY SEARCH.
if sy-subrc = 0.
it_billing-ddl = it_lips-vbeln .
it_billing-posnr = it_lips-posnr.
endif.
READ TABLE it_likp WITH KEY vbeln = it_vbrp-vgbel BINARY SEARCH.
if sy-subrc = 0.
it_billing-vstel = it_likp-vstel.
modify it_billing.
endif.
endloop.
‎2008 Aug 19 5:06 AM
Hi,
The Purpose of MODIFY stmt is to modify the internal table content with in the particular loop of the internal table.
The reason for dump is ur modifying the unknown internal table directly.
To avoid ur dump,
Please try in the following fashion..
Modify it_billing transporting the field which u modified where primary key condition.
Ex: Modify it_billing transporting vstel posnr ddl where vben = it_vbrp-vbeln
‎2008 Aug 19 4:45 AM
Hi Kumar,
Can you please tell the message you are getting in the DUMP.
Best regards,
raam
‎2008 Aug 19 4:52 AM
Raam
following is error message
Error in an ABAP/4 statement when processing an internal table.
happened?
Error in the ABAP Application Program
The current ABAP program "ZVIO1044" had to be terminated because it has
come across a statement that unfortunately cannot be executed.
r analysis
You attempted to change, delete or create a line in the
internal table "\PROGRAM=ZVIO1044\DATA=IT_BILLING[]", but no valid cursor
exists
for the table.
Possible reasons:
1. The relevent ABAP/4 statement does not include the addition
"...INDEX...", although the statement is not
inside a "LOOP...ENDLOOP" loop processing this table.
2. The relevent ABAP/4 statement was called from within a
"LOOP...ENDLOOP" loop after a DELETE "\PROGRAM=ZVIO1044\DATA=IT_BILLING[]".
‎2008 Aug 19 4:55 AM
Hi Kumar,
Please check this link
http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb35eb358411d1829f0000e829fbfe/content.htm
Best regards,
raam
‎2008 Aug 19 4:50 AM
Hi ,
modify it_billing check this statement ---> try like this
MODIFY table IT_billing transporting xxxxx. see the sytax.
Regards
Prabhu
‎2008 Aug 19 4:53 AM
Hi Kumar,
U 've mentioned it as MODIFY, but the code doesnt know which line to modify.....rgt??
Thts the reason its goin to dump. U can give an INDEX there so tht it gets to know the rgt place to insert.
below r some of the ways in which u can use MODIFY statement.
Modify ITAB from WA index 1
Modify ITAB from WA
modify ITAB from WA transporting FIELD
Or simplest is take F1 help man....it helps a lot.
Thanks & Regards,
Ramya Shree M R
‎2008 Aug 19 4:53 AM
Hi,
Try this.
modify it_billing transporting ddl posnr vstel where vbeln = it_vbrp-vgbel.
Sharin.
‎2008 Aug 19 4:58 AM
Hi Sharin
I tried
modify it_billing transporting ddl posnr vstel where vbeln = it_vbrp-vgbel.
but sy-subrc is 4.
‎2008 Aug 19 5:05 AM
‎2008 Aug 19 5:06 AM
Hi,
The Purpose of MODIFY stmt is to modify the internal table content with in the particular loop of the internal table.
The reason for dump is ur modifying the unknown internal table directly.
To avoid ur dump,
Please try in the following fashion..
Modify it_billing transporting the field which u modified where primary key condition.
Ex: Modify it_billing transporting vstel posnr ddl where vben = it_vbrp-vbeln
‎2008 Aug 19 5:17 AM
loop at it_vbrp.
READ TABLE it_lips WITH KEY vbeln = it_vbrp-vgbel BINARY SEARCH.
if sy-subrc = 0.
it_billing-ddl = it_lips-vbeln .
it_billing-posnr = it_lips-posnr.
endif.
READ TABLE it_likp WITH KEY vbeln = it_vbrp-vgbel BINARY SEARCH.
if sy-subrc = 0.
it_billing-vstel = it_likp-vstel.
endif.
"if already it_billing there and you want to modify then
modify it_billing transporting ddl posnr vstel where vbeln = it_vbrp-vbeln.
"and also i am thinking if you are populating billing info in this place not before
"then use
append it_billing.
endloop.