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

Simple code required

Former Member
0 Likes
303

Hi

Look at the below code :

IF int_edidd-segnam = c_e1edka1.

MOVE int_edidd-sdata TO l_e1edka1.

IF l_e1edka1-parvw = 'BK'.

IF l_e1edka1-name3 is INITIAL.

concatenate 'VAT Registration No: ' l_paval into l_paval.

l_e1edka1-name3 = l_paval.

MOVE l_e1edka1 TO int_edidd-sdata.

<b> MODIFY int_edidd TRANSPORTING sdata WHERE segnam = 'e1edka1' and</b> sdata = 'BK%'.

ENDIF.

ENDIF.

ENDIF.

The statement marked Bold is not working properly(i.e Not modifying the internal table contents)

Please suggest something (Or some other code to modify "int_edidd")

Note : Modify using Sy-tabix is not working as sy-tabix is always 1.

Points will be surely rewarded..

Regards

Tulip

Message was edited by:

Tulip Shah

1 REPLY 1
Read only

Former Member
0 Likes
275

Hi

You can't use where condition along with modify statement

instead of

MODIFY int_edidd TRANSPORTING sdata WHERE segnam = 'e1edka1' and sdata = 'BK%'.

use

<b>MODIFY int_edidd TRANSPORTING sdata .</b>

and see the result.

if you wants to move into sdata field at a particular position use the offset value

int_edidd-sdata+40(50) = l_e1edka1 .

<b>Reward points for useful Answers</b>

Regards

Anji