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

update/modify an internal table

SwarnaliBasu
Participant
0 Likes
1,285

hello

i m writing a program in which i m adding a new field to a table type, after adding i want to select those SO no which has the date='06/08/2009', but in the o/p screen i m seeing that the beside the SO no those two date values in the date field is coming , but i can t modify my screen to only these two SO.

LOOP AT i_vbkds INTO w_vbkds.
      READ TABLE postab INTO wa_postab  WITH KEY vbeln = w_vbkds-zvbeln.
     IF sy-subrc = 0.
        i_index = sy-tabix.
        postab-fkdate = w_vbkds-zdate.
        postab-vbeln = w_vbkds-zvbeln.

        MODIFY postab INDEX i_index TRANSPORTING fkdate.

       if sy-subrc = 0.

       endif.
      ENDIF.
      CLEAR : w_vbkds.

    ENDLOOP.

  ENDIF.

in this internal table vbkds only 2 datsa is shown but i can modify the same in postab(table which is uysed in display)

please help

Edited by: Rob Burbank on Nov 13, 2009 9:19 AM

11 REPLIES 11
Read only

Former Member
0 Likes
1,208

Hi,

Could you please explain your problem clearly?

How are u facing problme with modify?

Regards,

Subhashini

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
1,208

I find vbeln missing in the modify statement.

MODIFY postab INDEX i_index TRANSPORTING fkdate.

Please Debug and find the solution.

Read only

former_member191735
Active Contributor
0 Likes
1,208

LOOP AT i_vbkds INTO w_vbkds.

READ TABLE postab INTO wa_postab WITH KEY vbeln = w_vbkds-zvbeln.

IF sy-subrc = 0.

i_index = sy-tabix.

postab-fkdate = w_vbkds-zdate.

postab-vbeln = w_vbkds-zvbeln.

Where is VBELN? You are not moving the ZVBELN to POSTAB.

MODIFY postab INDEX i_index TRANSPORTING fkdate.

Remove transporting option or add VBELN after FKDATE.

Read only

0 Likes
1,208

Hi you can use,

MODIFY postab INDEX i_index TRANSPORTING fkdate vbeln.

Regards

Abhii...

Read only

0 Likes
1,208

hi

i have elaboratd my prblm.please check

Read only

Clemenss
Active Contributor
0 Likes
1,208

Hi,

there is a better solution: Always

LOOP ASSIGNING <field-symbol>

and then just change the values of the components of the field-symbol that you want to change.

No more modify and a considerable gain of performance.

Regards,

Clemens

Read only

SwarnaliBasu
Participant
0 Likes
1,208

hi all

thnx 4 ur reply...

i have also written transporting with vbeln but i removed it coz i was facing the same error.

vbeln fkdate

234 09082009

252 06082009

211 06082009

421

now when i give the search critera for fkdate = '06/08/2009' then i wat to show

vbeln fkdate

252 06082009

211 06082009

but for me rest of the things are also following with the fkdate value as ' '(when i check those SO fkdate is nt blank)

still in the selection criteria all comes..

postab is the final table to ALV, there are other fields also in POSTAB.

please help now

Read only

0 Likes
1,208

Hi,

Try this


MODIFY postab FROM wa_posttab INDEX i_index TRANSPORTING fkdate vbeln.

Read only

0 Likes
1,208

hi

even if i do this i get the same problem , that all the values are coming in postab , there is no modification at all.

e.g. if before the modification there are 7 values then aftyer the selection there should be 2 values according to the internal table i_VBKDS, but this is not reflecting in postab

please tell me how to do it

Regards

SB

Read only

0 Likes
1,208

Hi,

Few clarifications....

-> Have you already populated the final postab internal table?

-> If you have not, you can use APPEND statement to add data to the final internal table.

-> And, please rephrase your problem so that we can understand it better.

Read only

0 Likes
1,208

hi

i m copying a standard program and enhancing it, anwz i have solved the problem myself..so thanks to all