‎2008 Aug 23 8:51 AM
Hi all
Please rewrite the below code to get the output using only ALV class.
REPORT ZALV_CLASS7.
data class1 type ref to cl_gui_alv_grid.
TYPES:BEGIN OF t_mat,
matnr TYPE mara-matnr,
werks TYPE marc-werks,
maktx TYPE makt-maktx,
END OF t_mat.
TYPES:BEGIN OF t_bseg,
bukrs TYPE bseg-bukrs,
blart TYPE bkpf-blart,
END OF t_bseg.
DATA:BEGIN OF it_final OCCURS 0,
matnr TYPE mara-matnr,
werks TYPE marc-werks,
maktx TYPE makt-maktx,
bukrs TYPE bseg-bukrs,
blart TYPE bkpf-blart,
END OF it_final.
DATA:it_mat TYPE STANDARD TABLE OF t_mat WITH HEADER LINE.
DATA:it_bseg TYPE STANDARD TABLE OF t_bseg WITH HEADER LINE.
START-OF-SELECTION.
SELECT * FROM mara INTO CORRESPONDING FIELDS OF TABLE
it_mat.
SELECT * FROM marc INTO CORRESPONDING FIELDS OF TABLE
it_mat .
SELECT * FROM bseg INTO CORRESPONDING FIELDS OF TABLE
it_bseg.
END-OF-SELECTION.
LOOP at it_final.
it_final-matnr = it_mat-matnr.
it_final-werks = it_mat-werks.
it_final-maktx = it_mat-maktx.
it_final-bukrs = it_bseg-bukrs.
it_final-blart = it_final-blart.
APPEND it_final.
ENDLOOP.
WIth Regards
Vijay.
‎2008 Aug 23 8:56 AM
Please rewrite the below code to get the output using only ALV class.
How much buks you will give for rewriting your code?
Refer:
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/abap/class%2balv
Amit.
‎2008 Aug 23 11:16 AM
Hi,
No one is here to write your code, you have to write your own.
Follow this link for Procedure to write ALV using Class concept-
[ALV using Class Concept|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/abap-7StepstocreateOOPSALV%28forbeginners%29&]
Regards,
Sujit
‎2008 Aug 25 6:12 AM
Wow ... I've never seen some one so straight forward in asking people to do your job while you sit back and relax ...
As Amit said ... So how much do I get paid !!
Dude... If you try yourself ... you will learn something ..
If you take this approach .. then I don't think you will ever learn ABAP !!
An what will you tell your boss when he asks some questions back ?
And what if he is impressed and gives you another OO ALV report to write !! You will come back to SDN again !!
Well check out the some tutorials and code examples here ...
And then try it out yourself ..
Tutorials: http://www.abaplearning.com/abap-tutorials
Examples: http://www.abaplearning.com/abap-example-codes
And believe me ... there is nothing as pleasing when you see the output of your own written code... instead of running some one else's code !!
Cheers.