Code: Alles auswählen.
*&---------------------------------------------------------------------*
*& Form einteilungen ermitteln
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->IMP_PAR_TAB text
* -->EXP_PAR_TAB text
*----------------------------------------------------------------------*
*---------------------------------------------------------------------*
* /: PERFORM LTAK_PS_PSP_PNR in PROGRAM YM_SCRIPT *
* /: USING &EKPO-EBELN&
* /: USING &EKPO-EBELP&
* /: CHANGING &PARTFLG&
* /: ENDPERFORM *
*---------------------------------------------------------------------*
FORM einteilung TABLES imp_par_tab STRUCTURE itcsy
exp_par_tab STRUCTURE itcsy.
DATA: ebeln LIKE ekpo-ebeln.
DATA: ebelp LIKE ekpo-ebelp.
DATA: count TYPE int4.
REFRESH exp_par_tab.
CLEAR: ebeln,ebelp,count.
* Hole Importparameter
READ TABLE imp_par_tab WITH KEY name = 'EKPO-EBELN'.
CHECK sy-subrc = 0.
* sonst klappt der SELECT nicht
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = imp_par_tab-value
IMPORTING
output = ebeln.
2. Parameter
READ TABLE imp_par_tab WITH KEY name = 'EKPO-EBELP'.
CHECK sy-subrc = 0.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = imp_par_tab-value
IMPORTING
output = ebelp.
* Zähle Einträge
SELECT COUNT(*) INTO count FROM eket
WHERE ebeln = ebeln AND ebelp = ebelp.
IF sy-subrc = 0.
* Rückgabeparameter
exp_par_tab-name = 'PARTFLG'.
IF count > 1.
exp_par_tab-value = '+'.
ELSE.
exp_par_tab-value = '-'.
ENDIF.
APPEND exp_par_tab.
ENDIF.
ENDFORM. "LIEFERANT