Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

abap dump

Former Member
0 Likes
1,186

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,094

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

10 REPLIES 10
Read only

Former Member
0 Likes
1,094

Hi Kumar,

Can you please tell the message you are getting in the DUMP.

Best regards,

raam

Read only

0 Likes
1,094

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[]".

Read only

0 Likes
1,094
Read only

Former Member
0 Likes
1,094

Hi ,

modify it_billing check this statement ---> try like this

MODIFY table IT_billing transporting xxxxx. see the sytax.

Regards

Prabhu

Read only

Former Member
0 Likes
1,094

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

Read only

Former Member
0 Likes
1,094

Hi,

Try this.

modify it_billing transporting ddl posnr vstel where vbeln = it_vbrp-vgbel.

Sharin.

Read only

0 Likes
1,094

Hi Sharin

I tried

modify it_billing transporting ddl posnr vstel where vbeln = it_vbrp-vgbel.

but sy-subrc is 4.

Read only

Former Member
0 Likes
1,094

hi,

check this...

modify table it_billing.

regards

padma

Read only

Former Member
0 Likes
1,095

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

Read only

Former Member
0 Likes
1,094
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.