2020 Feb 27 9:25 AM
report.txtop.jpgHi ,
I am new to ABAP, me developed an ALV report to get the "material report'. Here i Set an "appliction toolbar as "ITEM". So when i click the button need to get the relavant data for "MARD". Can someone provide the logic for it..
I have attachement the code snippet and output i i got.
Thanks.
report.txtop.jpgHi ,
I am new to ABAP, me developed an ALV report to get the "material report'. Here i Set an "appliction toolbar as "ITEM". So when i click the button need to get the relavant data for "MARD". Can someone provide the logic for it..
I have attachement the code snippet and output i i got.
Thanks.
2020 Feb 27 10:01 AM
Your requirement "get the relavant data for MARD" is meaningless, what are the rules to access this table when the button "ITEM" is pressed? (my crystal ball is not sufficient to guess what is in your head).
NB: REUSE_ALV_GRID_DISPLAY and REUSE_ALV_LIST_DISPLAY are obsolete function modules, they have been superseded by CL_SALV_TABLE.
2020 Feb 27 10:10 AM
2020 Feb 28 11:46 AM
2020 Feb 27 10:16 AM
raymond.giuseppi
Yes, i checked the user_commant its not receive the form_mard.
Just i practising myself, this is not an requirment.
2020 Feb 27 10:24 AM
Please use the COMMENT button for comments, questions, adding details, etc., ANSWER is only to propose a solution, dixit SAP text at the right of the answer area.
2020 Feb 27 1:34 PM
row id that you selected in IT_LAST should be stored in rs_selfield-tabindex
2020 Feb 27 1:40 PM
As a beginner in ABAP you're starting in the wrong place, using procedural. Of course these language elements need to be understood - but only for maintaining legacy applications. I strongly recommend that you try to rewrite your program using a local class, and CL_SALV_TABLE instead of REUSE_ALV_GRID_DISPLAY.
Three points regarding your code.
1. Don't use prefixes on your variables. Use meaningful names instead. If you must use prefixes, then make sure they're the correct prefix. You've used the L prefix to refer to variables that are manifestly global.
2. Absolutely minimise the use of global variables. Much better to use parameters on subroutines, and local variables.
3. TABLES is an obsolete statement.
There are some great resources for learning to program ABAP in a modern way. It looks like you've got hold of some dinosaur tutorials, written for ABAP as it was over 20 years ago!
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |