SELECTION-SCREEN begin of BLOCK so with frame
title text-918. "special stocks
SELECTION-SCREEN PUSHBUTTON /1(20) PB_SOB USER-COMMAND PSOB.
* user wants to select all existing special stocks ?
parameters : kzlso like rmmmb-kzlso default X
modif id sob.
SELECT-OPTIONS :
* sales order
SO_EEAUF FOR iseg-kdauf MATCHCODE OBJECT VMCF
modif id sob,
* vendor consignment
SO_KKLIF FOR iseg-LIFNR matchcode object kred
modif id sob,
* return transport pack.
SO_MMLIF FOR iseg-LIFNR matchcode object kred
modif id sob,
* stock provided to vendor
SO_OOLIF FOR iseg-LIFNR matchcode object kred
modif id sob,
* project stock ( input in readable from )
* use the long format for the WBS element "n400792
so_qqpnr for prps-posid "n400792
matchcode object prp
modif id sob,
* return pack customer
SO_VVKUN FOR iseg-KUNNR matchcode object debi
modif id sob,
* customer consignment
SO_WWKUN FOR iseg-KUNNR matchcode object debi
modif id sob.
SELECTION-SCREEN END OF BLOCK so.
*****************************************************************
AT SELECTION-SCREEN OUTPUT. "vor den Senden Selektionsbild
* Sollen die Parameter fuer die Stati-Selektion gezeigt werden ?
LOOP AT SCREEN.
* modify the selection screen "n0377071
case SCREEN-GROUP1.
when 'SAP'.
* show or hide selection fields for doc. status
IF ZW_ZUSTAND = C_SHOW.
SCREEN-ACTIVE = EINS.
ELSE.
SCREEN-ACTIVE = NULL.
ENDIF.
MODIFY SCREEN.
when 'SOB'.
* show or hide selection fields for special stocks
IF ZW_ZUSTAND_sob = C_SHOW.
SCREEN-ACTIVE = EINS.
ELSE.
SCREEN-ACTIVE = NULL.
ENDIF.
MODIFY SCREEN.
endcase.
ENDLOOP.
CASE ZW_ZUSTAND. "Zeigen oder Verstecken ?
WHEN C_HIDE.
MOVE TEXT-066 TO PARAM. "@0E\Q@ Statusauswahl
WHEN C_SHOW.
MOVE TEXT-067 TO PARAM. "@0H\Q@ Statusauswahl
WHEN OTHERS.
ENDCASE.
* Pushbutton for special stock selection "n0377071
CASE ZW_ZUSTAND_sob. "show or hide ?
WHEN C_HIDE.
MOVE TEXT-076 TO PB_SOB. "@0E\Q@ Details
WHEN C_SHOW.
MOVE TEXT-077 TO PB_SOB. "@0H\Q@ Details
WHEN OTHERS.
ENDCASE.
AT SELECTION-SCREEN.
* Wurde der Pushbutton betaetigt ? wenn ja, wird die Anzeige der
* Stati-Selektions-Parameter geaendert
* did the user hit one of the pushbuttons ? "n0377071
case SSCRFIELDS-UCOMM.
when 'PARA'.
* the pushbutton for the doc. status was hit
IF ZW_ZUSTAND = C_HIDE.
MOVE C_SHOW TO ZW_ZUSTAND.
ELSE.
MOVE C_HIDE TO ZW_ZUSTAND.
ENDIF.
when 'PSOB'.
* the pushbutton for the special stocks was hit
IF ZW_ZUSTAND_sob = C_HIDE.
MOVE C_SHOW TO ZW_ZUSTAND_sob.
ELSE.
MOVE C_HIDE TO ZW_ZUSTAND_sob.
ENDIF.
ENDcase.