‎2009 Nov 13 1:43 PM
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
‎2009 Nov 13 2:03 PM
Hi,
Could you please explain your problem clearly?
How are u facing problme with modify?
Regards,
Subhashini
‎2009 Nov 13 2:14 PM
I find vbeln missing in the modify statement.
MODIFY postab INDEX i_index TRANSPORTING fkdate.
Please Debug and find the solution.
‎2009 Nov 13 2:27 PM
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.
‎2009 Nov 13 2:33 PM
Hi you can use,
MODIFY postab INDEX i_index TRANSPORTING fkdate vbeln.
Regards
Abhii...
‎2009 Nov 15 4:24 PM
‎2009 Nov 13 3:17 PM
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
‎2009 Nov 15 4:11 PM
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
‎2009 Nov 15 6:50 PM
Hi,
Try this
MODIFY postab FROM wa_posttab INDEX i_index TRANSPORTING fkdate vbeln.
‎2009 Nov 16 7:23 AM
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
‎2009 Nov 16 8:49 AM
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.
‎2009 Nov 16 9:50 AM
hi
i m copying a standard program and enhancing it, anwz i have solved the problem myself..so thanks to all