Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to change content of one ALV date column depending on select-options and 1 radiobutton

manole_apetroaie
Participant
0 Kudos

Dear colleagues,

I am working on a report where i need to modify an alv date column depending on one select-options date field and one of the radio buttons or check boxes. For example when i put 2 different dates -___to___ in first select-option(AUFK-GSTRP-process order launch date) and select radio button 1(flag1) or checkbox then i want to have in the alv the difference between AUFM-BLDAT(process order finished date) and AFKO-GLTRP(process order estimaed finish date).I appreciate any help. Thank you in advance.

This is what i made so far :

SELECTION-SCREEN BEGIN OF BLOCK BLOCK1 WITH FRAME TITLE text-001.
SELECT-OPTIONS NrCom FOR AUFK-AUFNR. "Comanda proces
SELECT-OPTIONS Material FOR AFKO-PLNBEZ. "Cod material
SELECT-OPTIONS UnitLog FOR AUFK-WERKS. " Unitate logistica
SELECT-OPTIONS TipCom FOR AUFK-AUART. "Tip comanda/Sectie
SELECT-OPTIONS COMINTRE FOR AFKO-GSTRP. "modif id m1. "Date intre care s-au lansat comenzi
SELECTION-SCREEN END OF BLOCK BLOCK1.

SELECTION-SCREEN BEGIN OF BLOCK BLOCK2 WITH FRAME TITLE text-001.
SELECTION-SCREEN COMMENT /1(79) label_4.
PARAMETERS: btn1 RADIOBUTTON GROUP RAD1 USER-COMMAND chk DEFAULT 'X',
btn2 RADIOBUTTON GROUP RAD1,
btn3 RADIOBUTTON GROUP RAD1.
SELECTION-SCREEN END OF BLOCK BLOCK2.

START-OF-SELECTION.
"AT SELECTION-SCREEN OUTPUT.

LOOP AT lt_join INTO wa_join.
WRITE:/ 'Radio Button1 -Comenzi data plan depasit'.
IF btn1 = 'X'.

IF wa_join-bldat > wa_join-gltrp."
wa_join-comdep = 'Depasit'." Comenzi termen depasit.
ENDIF.
ENDIF.
MODIFY SCREEN.
ENDLOOP.

1 ACCEPTED SOLUTION

manole_apetroaie
Participant
0 Kudos

Dear Administrators,

I managed to solve my problem. You can now close this thread.Please find below the solution:

if btn1 = 'X'.
ls_filter-fieldname = 'COMDEP'. "Filtru data comanda intre doua date calendaristice pentru Depasit radiobuton "
ls_filter-tabname = 'LT_JOIN'.
ls_filter-sign0 = 'I'.
ls_filter-optio = 'EQ'.
ls_filter-valuf_int = 'Depasit'.
APPEND ls_filter TO It_filter.
ELSEIF btn3 = 'X'.
ls_filter-fieldname = 'COMDEP'. "Filtru data comanda intre doua date calendaristice pentru Nedepasit radiobuton "
ls_filter-tabname = 'LT_JOIN'.
ls_filter-sign0 = 'I'.
ls_filter-optio = 'EQ'.
ls_filter-valuf_int = 'Nedepasit'.
APPEND ls_filter TO It_filter.
EndIf.

3 REPLIES 3

Sandra_Rossi
Active Contributor
0 Kudos

Where is the exact question? Calculating a difference between 2 dates is not a valid question as it has been asked thousands of times in the forum, and is in the abap documentation too. Same thing for testing the "value" of a checkbox. How should the from-to values be used in the calculation? Why did you post the code of the selection screen?

manole_apetroaie
Participant
0 Kudos

I know how to calculate between two dates. I want to know how to make a select-options dependant of a radio button and affect rows of one column.I posted the code to show what i tried by now.

manole_apetroaie
Participant
0 Kudos

Dear Administrators,

I managed to solve my problem. You can now close this thread.Please find below the solution:

if btn1 = 'X'.
ls_filter-fieldname = 'COMDEP'. "Filtru data comanda intre doua date calendaristice pentru Depasit radiobuton "
ls_filter-tabname = 'LT_JOIN'.
ls_filter-sign0 = 'I'.
ls_filter-optio = 'EQ'.
ls_filter-valuf_int = 'Depasit'.
APPEND ls_filter TO It_filter.
ELSEIF btn3 = 'X'.
ls_filter-fieldname = 'COMDEP'. "Filtru data comanda intre doua date calendaristice pentru Nedepasit radiobuton "
ls_filter-tabname = 'LT_JOIN'.
ls_filter-sign0 = 'I'.
ls_filter-optio = 'EQ'.
ls_filter-valuf_int = 'Nedepasit'.
APPEND ls_filter TO It_filter.
EndIf.