You can create a Dialog module that, when called from an ABAP program, passes ranges to a Dialog program. The code...
By submitting your personal information, you agree that TechTarget and its partners may contact you regarding relevant content, products and special offers.
snippets that follow take a range of customer numbers entered into an ABAP program, calls a dialog module that passes the range and executes a dialog program screen. ( Note: In SE11, SAP has pre-defined a list of ranges that you can use. Use F4 help for Tables with [*RANG* ]. )
ABAP (/nSE38) PROGRAM: Z_CUSTOMER_MTC. SELECT-OPTIONS: SKUNNR FOR KNA1-KUNNR. RANGES: RKUNNR FOR KNA1-KUNNR. END-OF-SELECTION: CALL DIALOG 'Z_PASS_KUNNR' EXPORTING RKUNNR FROM SKUNNR. DIALOG MODULE (/nSE35) Module Name: Z_PASS_KUNNR Program: SAPMZKUN Screen: 0500 Import: RKUNNR Defined as: KUN_RANGE DIALOG PROGRAM (/nSE80) Program: SAPMZKUN Screen: 0500 with a table of customers onscreen RANGES: RKUNNR FOR KNA1-KUNNR. Defined in TOP include PROCESS BEFORE OUTPUT. MODULE GET_DATA_0500. MODULE GET_DATA_0500. SELECT * FROM KNA1 INTO TABLE KNA1_TBL WHERE KUNNR IN RKUNNR.