"Get cursor/Line selection" Code Answer's
You're definitely familiar with the best coding language Whatever that developers use to develop their projects and they get all their queries like "Get cursor/Line selection" answered properly. Developers are finding an appropriate answer about Get cursor/Line selection related to the Whatever coding language. By visiting this online portal developers get answers concerning Whatever codes question like Get cursor/Line selection. Enter your desired code related query in the search bar and get every piece of information about Whatever code related question on Get cursor/Line selection.
Get cursor/Line selection
REPORT ZSAPN_INTERACTIVE_GETCURSOR LINE-COUNT 30(3) NO STANDARD PAGE HEADING.
DATA : IT_MARA TYPE TABLE OF MARA,
WA_MARA TYPE MARA,
IT_MAKT TYPE TABLE OF MAKT,
WA_MAKT TYPE MAKT.
DATA : FNAM(30), FVAL(50).
SELECT-OPTIONS : S_MATNR FOR WA_MARA-MATNR.
INITIALIZATION.
AT SELECTION-SCREEN.
PERFORM VALIDATE_INPUT.
START-OF-SELECTION.
PERFORM GET_DATA.
PERFORM DISPLAY_DATA.
TOP-OF-PAGE.
PERFORM DISPLAY_TOPOFPAGE.
AT LINE-SELECTION.
PERFORM DISPLAY_SECONDARYLIST.
TOP-OF-PAGE DURING LINE-SELECTION.
PERFORM LINE_TOPOFPAGE.
FORM VALIDATE_INPUT .
IF S_MATNR IS INITIAL.
MESSAGE 'Enter material input' TYPE 'E'.
ENDIF.
ENDFORM. " VALIDATE_INPUT
FORM GET_DATA .
SELECT * FROM MARA INTO TABLE IT_MARA WHERE MATNR IN S_MATNR.
ENDFORM. " GET_DATA
FORM DISPLAY_DATA .
LOOP AT IT_MARA INTO WA_MARA.
WRITE:/ WA_MARA-MATNR, WA_MARA-MTART, WA_MARA-MATKL, WA_MARA-MEINS.
ENDLOOP.
ENDFORM. " DISPLAY_DATA
FORM DISPLAY_SECONDARYLIST .
GET CURSOR FIELD FNAM VALUE FVAL.
CONDENSE FNAM.
CONDENSE FVAL.
IF FNAM = 'WA_MARA-MATNR'.
SELECT SINGLE * FROM MARA INTO WA_MARA WHERE MATNR = FVAL .
WRITE:/ WA_MARA-MATNR, WA_MARA-MBRSH, WA_MARA-MTART, WA_MARA-MATKL, WA_MARA-MEINS, WA_MARA-ERSDA, WA_MARA-ERNAM.
ELSEIF FNAM = 'WA_MARA-MTART'.
SELECT * FROM MARA INTO TABLE IT_MARA UP TO 50 ROWS WHERE MTART = FVAL.
LOOP AT IT_MARA INTO WA_MARA.
WRITE:/ WA_MARA-MATNR, WA_MARA-MTART, WA_MARA-MATKL.
ENDLOOP.
ENDIF.
ENDFORM. " DISPLAY_SECONDARYLIST
FORM DISPLAY_TOPOFPAGE .
WRITE:/ 'Material Details' COLOR 3.
ENDFORM. " DISPLAY_TOPOFPAGE
FORM LINE_TOPOFPAGE .
IF FNAM = 'WA_MARA-MATNR'.
WRITE:/ 'Material details ', WA_MARA-MATNR COLOR 5.
ELSEIF FNAM = 'WA_MARA-MTART'.
WRITE:/ 'Material with material type ', WA_MARA-MTART COLOR 5.
ENDIF.
ENDFORM. " LINE_TOPOFPAGE
Source: www.sapnuts.com
All those coders who are working on the Whatever based application and are stuck on Get cursor/Line selection can get a collection of related answers to their query. Programmers need to enter their query on Get cursor/Line selection related to Whatever code and they'll get their ambiguities clear immediately. On our webpage, there are tutorials about Get cursor/Line selection for the programmers working on Whatever code while coding their module. Coders are also allowed to rectify already present answers of Get cursor/Line selection while working on the Whatever language code. Developers can add up suggestions if they deem fit any other answer relating to "Get cursor/Line selection". Visit this developer's friendly online web community, CodeProZone, and get your queries like Get cursor/Line selection resolved professionally and stay updated to the latest Whatever updates.