51 - ABAP OOPS - ALV by CL_GUI_ALV_GRID - Creation Part6

preview_player
Показать описание
1) Practical Steps of ALV by CL_GUI_ALV_GRID Class.
Рекомендации по теме
Комментарии
Автор

hello Rahul sir, how to navigate back to selection screen from output screen ?

aniketdeshpande
Автор

Sir, As you shown, I have created a same screen with '0100' which is also my GUI screen no, I check in settings but when I am triggering it I am getting black screen on output. In debugging I have checked and I have the output in my final Int. table. Please guide.

YashWankhedkar
Автор

Hi Rahul,
When i try to call module pool screen and when I click Layout option, it prompts to blank screen and it says like this 'EU_SCRP_WN32 : timeout during allocate / CPIC-CALL: 'ThSAPCMRCV', '. Could you please guide me how to look over on this.

rajadudekula
Автор

hello sir, Good evening. Hope you are doing great!
TABLES: VBAK.
SELECT-OPTIONS: S_VBELN FOR VBAK-VBELN.

TYPES: BEGIN OF LSTY_VBAK,
VBELN TYPE VBELN_VA,
ERDAT TYPE ERDAT,
ERZET TYPE ERZET,
ERNAM TYPE ERNAM,
VBTYP TYPE VBTYP,
END OF LSTY_VBAK.

DATA: IT_VBAK TYPE TABLE OF LSTY_VBAK.
DATA: LWA_VBAK TYPE LSTY_VBAK.

TYPES: BEGIN OF LSTY_VBAP,
VBELN TYPE VBELN_VA,
POSNR TYPE POSNR_VA,
MATNR TYPE MATNR,
END OF LSTY_VBAP.

DATA: IT_VBAP TYPE TABLE OF LSTY_VBAP.
DATA: LWA_VBAP TYPE LSTY_VBAP.

TYPES: BEGIN OF LSTY_FINAL,
VBELN TYPE VBELN_VA,
ERDAT TYPE ERDAT,
ERZET TYPE ERZET,
ERNAM TYPE ERNAM,
VBTYP TYPE VBTYP,
POSNR TYPE POSNR_VA,
MATNR TYPE MATNR,
END OF LSTY_FINAL.

DATA: IT_FINAL TYPE TABLE OF LSTY_FINAL.
DATA: LWA_FINAL TYPE LSTY_FINAL.

*structre created in se11
DATA: GIT_FINAL TYPE ZGTSTR_OOPS_ALV_SALES.
DATA: GWA_FINAL TYPE ZGSTR_OOPS_ALV_SALES.

DATA: LT_FIELDCAT TYPE LVC_T_FCAT.
DATA: LO_OBJECT TYPE REF TO CL_GUI_CUSTOM_CONTAINER.
DATA: LO_GRID TYPE REF TO CL_GUI_ALV_GRID.

SELECT VBELN ERDAT ERZET ERNAM VBTYP
FROM VBAK INTO TABLE IT_VBAK
WHERE VBELN IN S_VBELN.
IF IT_VBAK IS NOT INITIAL.
SELECT VBELN POSNR MATNR
FROM VBAP INTO TABLE IT_VBAP
FOR ALL ENTRIES IN IT_VBAK
WHERE VBELN = IT_VBAK-VBELN.
ENDIF.

LOOP AT IT_VBAK INTO LWA_VBAK.
LOOP AT IT_VBAP INTO LWA_VBAP WHERE VBELN = LWA_VBAK-VBELN.
LWA_FINAL-VBELN = LWA_VBAK-VBELN.
LWA_FINAL-ERDAT = LWA_VBAK-ERDAT.
LWA_FINAL-ERZET = LWA_VBAK-ERZET.
LWA_FINAL-ERNAM = LWA_VBAK-ERNAM.
LWA_FINAL-VBTYP = LWA_VBAK-VBTYP.
LWA_FINAL-POSNR = LWA_VBAP-POSNR.
LWA_FINAL-MATNR = LWA_VBAP-MATNR.
APPEND LWA_FINAL TO IT_FINAL.
CLEAR: LWA_FINAL.
ENDLOOP.
ENDLOOP.


*LOOP AT IT_VBAK INTO LWA_VBAK.
* LOOP AT IT_VBAP INTO LWA_VBAP WHERE VBELN = LWA_VBAK-VBELN.
* GWA_FINAL-VBELN = LWA_VBAK-VBELN.
* GWA_FINAL-ERDAT = LWA_VBAK-ERDAT.
* GWA_FINAL-ERZET = LWA_VBAK-ERZET.
* GWA_FINAL-ERNAM = LWA_VBAK-ERNAM.
* GWA_FINAL-VBTYP = LWA_VBAK-VBTYP.
* GWA_FINAL-POSNR = LWA_VBAP-POSNR.
* GWA_FINAL-MATNR = LWA_VBAP-MATNR.
* APPEND GWA_FINAL TO GIT_FINAL.
* CLEAR: GWA_FINAL.
* ENDLOOP.
*ENDLOOP.

CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
* I_BUFFER_ACTIVE =
I_STRUCTURE_NAME = 'ZGSTR_OOPS_ALV_SALES'
* I_CLIENT_NEVER_DISPLAY = 'X'
* I_BYPASSING_BUFFER =
* I_INTERNAL_TABNAME =
CHANGING
CT_FIELDCAT = LT_FIELDCAT
EXCEPTIONS
INCONSISTENT_INTERFACE = 1
PROGRAM_ERROR = 2
OTHERS = 3
.
IF SY-SUBRC <> 0.
* Implement suitable error handling here
ENDIF.

CREATE OBJECT LO_OBJECT EXPORTING CONTAINER_NAME ='CONT'.
CREATE OBJECT LO_GRID EXPORTING I_PARENT = LO_OBJECT.

CALL METHOD
CHANGING
IT_OUTTAB = IT_FINAL
IT_FIELDCATALOG = LT_FIELDCAT
* IT_SORT =
* IT_FILTER =
EXCEPTIONS
INVALID_PARAMETER_COMBINATION = 1
PROGRAM_ERROR = 2
TOO_MANY_LINES = 3
OTHERS = 4
.
IF SY-SUBRC <> 0.
* Implement suitable error handling here
ENDIF.

CALL SCREEN '0100'.
in output i couldn't fetch the data only i could see empty field labels. data didn't bind with filed labels. not sure why. please look into it when you are free. thanks in advance!

gunasekharreddy
Автор

Where can i find topics splitter container, Docking container and dialog box container !?

jakkularajeev
Автор

Bro in some programs u write start-of-selection in some u dont, how to know to use it or not becoz we click on execute in every program

anirudhreddy