2023 Jul 07 3:32 AM
Hello expert!!
I have a requirement when I press custom button to create new data and insert new rows
this is the first screen.. when i press button create call screen 2 and the logic should get new row automatically
I have tried to create a subroutine for button 'CREATE'
LOOP AT gs_fieldcatalog INTO gv_fcat.
gv_fcat-edit = 'X'.
MODIFY gs_fieldcatalog FROM gv_fcat.
ENDLOOP.
CLEAR: gt_drebate.
DO 100 TIMES.
APPEND wa_rebate TO gt_rebate.
ENDDO.
Any help or guide would be grateful
Thank You
2023 Jul 07 8:31 AM
2023 Jul 07 9:15 AM
The problem is i put the wrong screen
i should put subroutine in the screen two
FORM update_database .
CLEAR: gt_drebate.
DO 25 TIMES.
APPEND wa_drebate TO gt_drebate.
ENDDO.
ENDFORM.
2023 Jul 07 10:05 AM
I guess you are experiencing the issue of instantiating several GUI controls (i.e. several ALV grids in your case) in the same container: only the first one is shown, so you think that it doesn't work.
See abap - ALV refresh problem while navigating from user command - Stack Overflow.
2023 Jul 07 10:21 AM
Thank You so much Sandra Rossi...
yeah the problem is put the subroutine on the wrong screen
2023 Jul 07 1:42 PM
Okay. Next time, debug your program before posting the question 😉