Skip to Content
-2

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

Sep 26, 2017 at 09:27 AM

56

avatar image
Former Member

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.

10 |10000 characters needed characters left characters exceeded

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?

0
Former Member

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.

0
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
avatar image
Former Member Oct 03, 2017 at 11:15 AM
0

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.

Share
10 |10000 characters needed characters left characters exceeded