Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

problem in alv grid display (it is not filtering the data in print preview)

Hi Every One,

Its very urgent for me to deliver this report ....

I applied sort criteria on my final internal table which is pupulated and then i passed to the function module...

when i execute the program it is showing me the perfect output..when i take a print preview it is not filtering the data instead it is showing me the normal uotput i.e..,without sort criteria...

here is the code plz go thru it and tell me were i am doing wrong...

i thank u one and all ...and plz debub the code on the system and let me know....

REPORT tracking-quotation NO STANDARD PAGE HEADING MESSAGE-ID zrv_message LINE-COUNT 65 LINE-SIZE 110.

----


  • Includes

----


  • This include contains declarations

INCLUDE ZMM_TRACKING_QUOTATION_T.

  • This include contains code for the performs

INCLUDE ZMM_TRACKING_QUOTATION_F.

************************************************************************

  • AT SELECTION SCREEN *

************************************************************************

AT SELECTION-SCREEN.

  • This perform will validate the fields

PERFORM f_validate_sel_screen.

----


  • Start-Of-Selection

----


START-OF-SELECTION.

  • This perform will read the values from the database.

PERFORM selection.

  • This perform will build the field catalogue

PERFORM f_build_catalogue.

  • This perform will build the sort

PERFORM f_event_sort.

  • This perform will build the layout

PERFORM f_build_layout.

  • This perform will build the event

PERFORM f_event_build.

  • This perform will build the comment

PERFORM f_comment_build.

  • This perform will display the list

PERFORM f_list_display.

----


  • End-Of-Selection

----


END-OF-SELECTION.

&----


*& Include ZMM_TRACKING_QUOTATION_T *

&----


************************************************************************

  • T a b l e s D e c l a r a t i o n s *

************************************************************************

TABLES: eban,

ebkn,

ekko,

eket,

lfa1,

ekpo.

----


  • Selection Screen Declaration

----


SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-100.

SELECT-OPTIONS: bednr FOR eban-bednr,

ps_psp FOR ebkn-ps_psp_pnr,

kostl FOR ebkn-kostl,

erdat FOR ebkn-erdat.

SELECTION-SCREEN END OF BLOCK b1.

***********************************************************************

  • Type Pools D e c l a r a t i o n s *

************************************************************************

TYPE-POOLS: slis.

************************************************************************

  • V a r i a b l e s *

************************************************************************

DATA : rt_fieldcat TYPE slis_t_fieldcat_alv,

i_layout TYPE slis_layout_alv,

i_event TYPE slis_t_event,

i_listheader TYPE slis_t_listheader,

l_sort TYPE slis_t_sortinfo_alv,

wa_sort TYPE slis_sortinfo_alv.

************************************************************************

  • I n t e r n a l T a b l e s *

************************************************************************

DATA: BEGIN OF i_final_tab OCCURS 0,

name1 LIKE lfa1-name1,

banfn LIKE eban-banfn,

badat LIKE eban-badat,

bnfpo LIKE eban-bnfpo,

txz01 LIKE eban-txz01,

menge LIKE eban-menge,

bednr LIKE eban-bednr,

frgdt LIKE eban-frgdt,

lfdat LIKE eban-lfdat,

ps_psp_pnr LIKE ebkn-ps_psp_pnr,

bwbdt LIKE ekko-bwbdt,

aedat LIKE ekko-aedat,

lifnr LIKE ekko-lifnr,

ihran LIKE ekko-ihran,

ebeln LIKE ekpo-ebeln,

ebelp LIKE ekpo-ebelp,

plifz LIKE ekpo-plifz,

eindt LIKE eket-eindt,

END OF i_final_tab.

DATA: BEGIN OF itab OCCURS 0,

name1 LIKE lfa1-name1,

banfn LIKE eban-banfn,

badat LIKE eban-badat,

bnfpo LIKE eban-bnfpo,

txz01 LIKE eban-txz01,

menge(17),

bednr LIKE eban-bednr,

frgdt LIKE eban-frgdt,

lfdat LIKE eban-lfdat,

ps_psp_pnr LIKE ebkn-ps_psp_pnr,

bwbdt LIKE ekko-bwbdt,

aedat LIKE ekko-aedat,

lifnr LIKE ekko-lifnr,

ihran LIKE ekko-ihran,

ebeln LIKE ekpo-ebeln,

ebelp LIKE ekpo-ebelp,

plifz LIKE ekpo-plifz,

eindt LIKE eket-eindt,

END OF itab.

&----


*& Include ZMM_TRACKING_QUOTATION_F *

&----


*&----


**& Form FIELDCAT_INIT

*&----


    • text

*----


    • -->P_GT_FIELDCAT[] text

*----


*

FORM f_build_catalogue.

DATA : ls_fieldcat TYPE slis_fieldcat_alv.

CLEAR ls_fieldcat.

ls_fieldcat-fieldname = 'BANFN'.

ls_fieldcat-tabname = 'itab'.

ls_fieldcat-seltext_m = 'PR Number'.

  • ls_fieldcat-ref_tabname = 'EBAN'.

ls_fieldcat-fix_column = ''.

ls_fieldcat-emphasize = ''.

APPEND ls_fieldcat TO rt_fieldcat.

*

  • CLEAR ls_fieldcat.

  • ls_fieldcat-tabname = 'ITAB'.

  • ls_fieldcat-fieldname = 'BNFPO'.

  • ls_fieldcat-ref_tabname = 'EBAN'.

  • APPEND ls_fieldcat TO rt_fieldcat.

*

*

  • CLEAR ls_fieldcat.

  • ls_fieldcat-tabname = 'ITAB'.

  • ls_fieldcat-fieldname = 'BADAT'.

  • ls_fieldcat-ref_tabname = 'EBAN'.

  • APPEND ls_fieldcat TO rt_fieldcat.

*

*

*

  • CLEAR ls_fieldcat.

  • ls_fieldcat-tabname = 'ITAB'.

  • ls_fieldcat-fieldname = 'TXZ01'.

  • ls_fieldcat-ref_tabname = 'EBAN'.

  • APPEND ls_fieldcat TO rt_fieldcat.

*

*

  • CLEAR ls_fieldcat.

  • ls_fieldcat-tabname = 'ITAB'.

  • ls_fieldcat-fieldname = 'MENGE'.

  • ls_fieldcat-ref_tabname = 'ITAB'.

  • ls_fieldcat-seltext_l = 'Quantity'.

  • APPEND ls_fieldcat TO rt_fieldcat.

*

*

*

  • CLEAR ls_fieldcat.

  • ls_fieldcat-tabname = 'ITAB'.

  • ls_fieldcat-fieldname = 'PS_PSP_PNR'.

  • ls_fieldcat-ref_tabname = 'EBKN'.

  • APPEND ls_fieldcat TO rt_fieldcat.

*

  • CLEAR ls_fieldcat.

  • ls_fieldcat-tabname = 'ITAB'.

  • ls_fieldcat-fieldname = 'BEDNR'.

  • ls_fieldcat-ref_tabname = 'EBAN'.

  • APPEND ls_fieldcat TO rt_fieldcat.

*

*

*

  • CLEAR ls_fieldcat.

  • ls_fieldcat-tabname = 'ITAB'.

  • ls_fieldcat-fieldname = 'FRGDT'.

  • ls_fieldcat-ref_tabname = 'EBAN'.

  • APPEND ls_fieldcat TO rt_fieldcat.

*

*

  • CLEAR ls_fieldcat.

  • ls_fieldcat-tabname = 'ITAB'.

  • ls_fieldcat-fieldname = 'LFDAT'.

  • ls_fieldcat-ref_tabname = 'EBAN'.

  • APPEND ls_fieldcat TO rt_fieldcat.

*

*

  • CLEAR ls_fieldcat.

  • ls_fieldcat-tabname = 'ITAB'.

  • ls_fieldcat-fieldname = 'EBELN'.

  • ls_fieldcat-ref_tabname = 'EKPO'.

  • APPEND ls_fieldcat TO rt_fieldcat.

*

  • CLEAR ls_fieldcat.

  • ls_fieldcat-tabname = 'ITAB'.

  • ls_fieldcat-fieldname = 'EBELP'.

  • ls_fieldcat-ref_tabname = 'EKPO'.

  • APPEND ls_fieldcat TO rt_fieldcat.

*

*

  • CLEAR ls_fieldcat.

  • ls_fieldcat-tabname = 'ITAB'.

  • ls_fieldcat-fieldname = 'AEDAT'.

  • ls_fieldcat-ref_tabname = 'EKKO'.

  • APPEND ls_fieldcat TO rt_fieldcat.

*

*

  • CLEAR ls_fieldcat.

  • ls_fieldcat-tabname = 'ITAB'.

  • ls_fieldcat-fieldname = 'LIFNR'.

  • ls_fieldcat-ref_tabname = 'EKKO'.

  • APPEND ls_fieldcat TO rt_fieldcat.

*

  • CLEAR ls_fieldcat.

  • ls_fieldcat-tabname = 'ITAB'.

  • ls_fieldcat-fieldname = 'NAME1'.

  • ls_fieldcat-ref_tabname = 'LFA1'.

  • APPEND ls_fieldcat TO rt_fieldcat.

*

  • CLEAR ls_fieldcat.

  • ls_fieldcat-tabname = 'ITAB'.

  • ls_fieldcat-fieldname = 'IHRAN'.

  • ls_fieldcat-ref_tabname = 'EKKO'.

  • APPEND ls_fieldcat TO rt_fieldcat.

*

  • CLEAR ls_fieldcat.

  • ls_fieldcat-tabname = 'ITAB'.

  • ls_fieldcat-fieldname = 'EINDT'.

  • ls_fieldcat-ref_tabname = 'EKET'.

  • APPEND ls_fieldcat TO rt_fieldcat.

*

  • CLEAR ls_fieldcat.

  • ls_fieldcat-tabname = 'ITAB'.

  • ls_fieldcat-fieldname = 'PLIFZ'.

  • ls_fieldcat-ref_tabname = 'EKPO'.

  • APPEND ls_fieldcat TO rt_fieldcat.

*

ENDFORM. " FIELDCAT_INIT

&----


*& Form selection

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


FORM selection .

SELECT

lfa1~name1

eban~banfn

eban~badat

eban~bnfpo

eban~txz01

eban~menge

eban~bednr

eban~frgdt

eban~lfdat

ebkn~ps_psp_pnr

ekko~bwbdt

ekko~aedat

ekko~lifnr

ekko~ihran

ekpo~ebeln

ekpo~ebelp

ekpo~plifz

eket~eindt

FROM lfa1 INNER JOIN ekko ON ( lfa1lifnr = ekkolifnr )

INNER JOIN ekpo ON ( ekkoebeln = ekpoebeln )

INNER JOIN eket ON ( ekpoebeln = eketebeln

AND

ekpoebelp = eketebelp )

INNER JOIN eban ON ( ebanbanfn = eketbanfn

AND

ebanbnfpo = eketbnfpo )

INNER JOIN ebkn ON ( ebanbanfn = ebknbanfn

AND

ebanbnfpo = ebknbnfpo )

INTO TABLE i_final_tab WHERE eban~bednr IN bednr AND

ebkn~ps_psp_pnr IN ps_psp AND

ebkn~kostl IN kostl AND

ebkn~erdat IN erdat AND

ekko~bstyp <> 'F'.

LOOP AT i_final_tab.

itab-name1 = i_final_tab-name1.

itab-banfn = i_final_tab-banfn.

itab-badat = i_final_tab-badat.

itab-bnfpo = i_final_tab-bnfpo.

itab-txz01 = i_final_tab-txz01.

itab-menge = i_final_tab-menge.

itab-bednr = i_final_tab-bednr.

itab-frgdt = i_final_tab-frgdt.

itab-lfdat = i_final_tab-lfdat.

itab-ps_psp_pnr = i_final_tab-ps_psp_pnr.

itab-aedat = i_final_tab-aedat.

itab-lifnr = i_final_tab-lifnr.

itab-ihran = i_final_tab-ihran.

itab-ebeln = i_final_tab-ebeln.

itab-ebelp = i_final_tab-ebelp.

itab-plifz = i_final_tab-plifz.

itab-eindt = i_final_tab-eindt.

APPEND itab.

CLEAR itab.

ENDLOOP.

ENDFORM. " selection

&----


*& Form f_event_build

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


FORM f_event_build .

DATA wa_event TYPE slis_alv_event.

CLEAR: wa_event,

i_event.

*read event top-of-page

CALL FUNCTION 'REUSE_ALV_EVENTS_GET'

EXPORTING

i_list_type = 0

IMPORTING

et_events = i_event.

IF sy-subrc <> 0.

ENDIF.

*Prepare event table

READ TABLE i_event WITH KEY name = 'TOP_OF_PAGE' INTO wa_event.

IF sy-subrc EQ 0.

MOVE 'TOP_OF_PAGE' TO wa_event-form.

APPEND wa_event TO i_event.

ENDIF.

ENDFORM. " f_event_build

&----


*& Form f_comment_build

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


FORM f_comment_build .

DATA: wa_listheader TYPE slis_listheader.

CLEAR wa_listheader.

wa_listheader-typ = 'H'.

wa_listheader-info = 'Tracking Of Quotation For Purchase Requisition'.

APPEND wa_listheader TO i_listheader.

CLEAR wa_listheader.

wa_listheader-typ = 'S'.

wa_listheader-info = 'SMS-DEMAG Pvt. Ltd.'.

APPEND wa_listheader TO i_listheader.

CLEAR wa_listheader.

wa_listheader-typ = 'S'.

wa_listheader-info = 'R1- Nehru Enclave'.

APPEND wa_listheader TO i_listheader.

CLEAR wa_listheader.

wa_listheader-typ = 'S'.

wa_listheader-info = 'New Delhi - '.

APPEND wa_listheader TO i_listheader.

ENDFORM. " f_comment_build

&----


*& Form f_build_layout

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


FORM f_build_layout .

CLEAR i_layout.

i_layout-colwidth_optimize = 'X'.

i_layout-zebra = 'X'.

i_layout-totals_text = 'Total'.

*

ENDFORM. " f_build_layout

&----


*& Form f_list_display

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


FORM f_list_display .

*sort itab by name1

  • banfn

  • badat

  • bnfpo

  • txz01

  • menge

  • bednr

  • frgdt

  • lfdat

  • ps_psp_pnr

  • bwbdt

  • aedat

  • lifnr

  • ihran

  • ebeln

  • ebelp

  • plifz

  • eindt.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

i_callback_program = sy-repid

is_layout = i_layout

it_fieldcat = rt_fieldcat

it_events = i_event

it_sort = l_sort

TABLES

t_outtab = itab.

IF sy-subrc <> 0.

ENDIF.

ENDFORM. " f_list_display

&----


*& Form TOP_OF_PAGE

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


FORM top_of_page.

CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'

EXPORTING

it_list_commentary = i_listheader

i_logo = 'ENJOYSAP_LOGO'.

ENDFORM. "TOP_OF_PAGE

&----


*& Form f_event_sort

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


FORM f_event_sort .

*

  • wa_sort-spos = 1.

  • wa_sort-up = 'X'.

  • wa_sort-tabname = 'i_final_tab'.

  • wa_sort-fieldname = 'BANFN'.

    • wa_sort-subtot = ' '.

  • APPEND wa_sort TO l_sort.

  • CLEAR WA_SORT.

*

*

*

  • wa_sort-spos = 5.

  • wa_sort-up = 'X'.

  • wa_sort-tabname = 'i_final_tab'.

  • wa_sort-fieldname = 'MENGE'.

    • wa_sort-subtot = ' '.

  • APPEND wa_sort TO l_sort.

*CLEAR WA_SORT.

*

*

**

  • wa_sort-spos = 2.

  • wa_sort-up = 'X'.

  • wa_sort-tabname = 'i_final_tab'.

  • wa_sort-fieldname = 'BNFPO'.

    • wa_sort-subtot = ' '.

  • APPEND wa_sort TO l_sort.

*CLEAR WA_SORT.

*

*

  • wa_sort-spos = 3.

  • wa_sort-up = 'X'.

  • wa_sort-tabname = 'i_final_tab'.

  • wa_sort-fieldname = 'BADAT'.

    • wa_sort-subtot = ' '.

  • APPEND wa_sort TO l_sort.

*CLEAR WA_SORT.

*

*

  • wa_sort-spos = 4.

  • wa_sort-up = 'X'.

  • wa_sort-tabname = 'i_final_tab'.

  • wa_sort-fieldname = 'TXZ01'.

    • wa_sort-subtot = ' '.

  • APPEND wa_sort TO l_sort.

*

*CLEAR WA_SORT.

*

*

  • wa_sort-spos = 7.

  • wa_sort-up = 'X'.

  • wa_sort-tabname = 'i_final_tab'.

  • wa_sort-fieldname = 'BEDNR'.

    • wa_sort-subtot = ' '.

  • APPEND wa_sort TO l_sort.

*CLEAR WA_SORT.

*

*

  • wa_sort-spos = 6.

  • wa_sort-up = 'X'.

  • wa_sort-tabname = 'i_final_tab'.

  • wa_sort-fieldname = 'PS_PSP_PNR'.

    • wa_sort-subtot = ' '.

  • APPEND wa_sort TO l_sort.

*CLEAR WA_SORT.

*

*

  • wa_sort-spos = 8.

  • wa_sort-up = 'X'.

  • wa_sort-tabname = 'i_final_tab'.

  • wa_sort-fieldname = 'FRGDT'.

    • wa_sort-subtot = ' '.

  • APPEND wa_sort TO l_sort.

*CLEAR WA_SORT.

*

*

  • wa_sort-spos = 9.

  • wa_sort-up = 'X'.

  • wa_sort-tabname = 'i_final_tab'.

  • wa_sort-fieldname = 'LFDAT'.

    • wa_sort-subtot = ' '.

  • APPEND wa_sort TO l_sort.

*CLEAR WA_SORT.

*

*

    • CLEAR wa_sort.

  • wa_sort-up = 'X'.

  • wa_sort-tabname = 'i_final_tab'.

  • wa_sort-spos = 10.

  • wa_sort-fieldname = 'EBELN'.

    • wa_sort-subtot = 'X'.

  • APPEND wa_sort TO l_sort.

*CLEAR WA_SORT.

*

*

    • CLEAR wa_sort.

  • wa_sort-up = 'X'.

  • wa_sort-tabname = 'i_final_tab'.

  • wa_sort-spos = 11.

  • wa_sort-fieldname = 'EBELP'.

    • wa_sort-subtot = ' '.

  • APPEND wa_sort TO l_sort.

*CLEAR WA_SORT.

*

*

*

    • CLEAR wa_sort.

  • wa_sort-up = 'X'.

  • wa_sort-tabname = 'i_final_tab'.

  • wa_sort-spos = 12.

  • wa_sort-fieldname = 'AEDAT'.

    • wa_sort-subtot = ' '.

  • APPEND wa_sort TO l_sort.

*CLEAR WA_SORT.

*

*

*

    • CLEAR wa_sort.

  • wa_sort-up = 'X'.

  • wa_sort-tabname = 'i_final_tab'.

  • wa_sort-spos = 13.

  • wa_sort-fieldname = 'LIFNR'.

    • wa_sort-subtot = ' '.

  • APPEND wa_sort TO l_sort.

*CLEAR WA_SORT.

*

*

*

    • CLEAR wa_sort.

  • wa_sort-up = 'X'.

  • wa_sort-tabname = 'i_final_tab'.

  • wa_sort-spos = 14.

  • wa_sort-fieldname = 'NAME1'.

    • wa_sort-subtot = ' '.

  • APPEND wa_sort TO l_sort.

*CLEAR WA_SORT.

*

*

    • CLEAR wa_sort.

  • wa_sort-up = 'X'.

  • wa_sort-tabname = 'i_final_tab'.

  • wa_sort-spos = 15.

  • wa_sort-fieldname = 'IHRAN'.

    • wa_sort-subtot = ' '.

  • APPEND wa_sort TO l_sort.

*CLEAR WA_SORT.

*

*

    • CLEAR wa_sort.

  • wa_sort-up = 'X'.

  • wa_sort-tabname = 'i_final_tab'.

  • wa_sort-spos = 16.

  • wa_sort-fieldname = 'EINDT'.

    • wa_sort-subtot = ' '.

  • APPEND wa_sort TO l_sort.

*CLEAR WA_SORT.

*

*sort l_sort by spos.

*

CLEAR wa_sort.

wa_sort-spos = 1.

wa_sort-fieldname = 'BANFN'.

wa_sort-down = 'X'.

  • wa_sort-tabname = 'itab'.

  • wa_sort-subtot = ' '.

APPEND wa_sort TO l_sort.

*

*

  • wa_sort-spos = 5.

  • wa_sort-down = 'X'.

    • wa_sort-tabname = 'itab'.

  • wa_sort-fieldname = 'MENGE'.

    • wa_sort-subtot = ' '.

  • APPEND wa_sort TO l_sort.

*CLEAR WA_SORT.

*

*

**

  • CLEAR wa_sort.

  • wa_sort-spos = 2.

  • wa_sort-fieldname = 'BNFPO'.

  • wa_sort-down = 'X'.

    • wa_sort-tabname = 'itab'.

*

    • wa_sort-subtot = ' '.

  • APPEND wa_sort TO l_sort.

*

  • wa_sort-spos = 3.

  • wa_sort-down = 'X'.

    • wa_sort-tabname = 'itab'.

  • wa_sort-fieldname = 'BADAT'.

    • wa_sort-subtot = ' '.

  • APPEND wa_sort TO l_sort.

*CLEAR WA_SORT.

*

*

  • wa_sort-spos = 4.

  • wa_sort-down = 'X'.

    • wa_sort-tabname = 'itab'.

  • wa_sort-fieldname = 'TXZ01'.

    • wa_sort-subtot = ' '.

  • APPEND wa_sort TO l_sort.

*

*CLEAR WA_SORT.

*

*

  • wa_sort-spos = 7.

  • wa_sort-down = 'X'.

    • wa_sort-tabname = 'itab'.

  • wa_sort-fieldname = 'BEDNR'.

    • wa_sort-subtot = ' '.

  • APPEND wa_sort TO l_sort.

*CLEAR WA_SORT.

*

*

  • wa_sort-spos = 6.

  • wa_sort-down = 'X'.

    • wa_sort-tabname = 'itab'.

  • wa_sort-fieldname = 'PS_PSP_PNR'.

    • wa_sort-subtot = ' '.

  • APPEND wa_sort TO l_sort.

*CLEAR WA_SORT.

*

*

  • wa_sort-spos = 8.

  • wa_sort-down = 'X'.

    • wa_sort-tabname = 'itab'.

  • wa_sort-fieldname = 'FRGDT'.

    • wa_sort-subtot = ' '.

  • APPEND wa_sort TO l_sort.

*CLEAR WA_SORT.

*

*

  • wa_sort-spos = 9.

  • wa_sort-down = 'X'.

    • wa_sort-tabname = 'itab'.

  • wa_sort-fieldname = 'LFDAT'.

    • wa_sort-subtot = ' '.

  • APPEND wa_sort TO l_sort.

*CLEAR WA_SORT.

*

*

    • CLEAR wa_sort.

  • wa_sort-down = 'X'.

    • wa_sort-tabname = 'itab'.

  • wa_sort-spos = 10.

  • wa_sort-fieldname = 'EBELN'.

    • wa_sort-subtot = 'X'.

  • APPEND wa_sort TO l_sort.

*CLEAR WA_SORT.

*

*

    • CLEAR wa_sort.

  • wa_sort-down = 'X'.

    • wa_sort-tabname = 'itab'.

  • wa_sort-spos = 11.

  • wa_sort-fieldname = 'EBELP'.

    • wa_sort-subtot = ' '.

  • APPEND wa_sort TO l_sort.

*CLEAR WA_SORT.

*

*

*

    • CLEAR wa_sort.

  • wa_sort-down = 'X'.

    • wa_sort-tabname = 'itab'.

  • wa_sort-spos = 12.

  • wa_sort-fieldname = 'AEDAT'.

    • wa_sort-subtot = ' '.

  • APPEND wa_sort TO l_sort.

*CLEAR WA_SORT.

*

*

*

    • CLEAR wa_sort.

  • wa_sort-down = 'X'.

    • wa_sort-tabname = 'itab'.

  • wa_sort-spos = 13.

  • wa_sort-fieldname = 'LIFNR'.

    • wa_sort-subtot = ' '.

  • APPEND wa_sort TO l_sort.

*CLEAR WA_SORT.

*

*

*

    • CLEAR wa_sort.

  • wa_sort-down = 'X'.

    • wa_sort-tabname = 'itab'.

  • wa_sort-spos = 14.

  • wa_sort-fieldname = 'NAME1'.

    • wa_sort-subtot = ' '.

  • APPEND wa_sort TO l_sort.

*CLEAR WA_SORT.

*

    • CLEAR wa_sort.

  • wa_sort-down = 'X'.

    • wa_sort-tabname = 'itab'.

  • wa_sort-spos = 15.

  • wa_sort-fieldname = 'IHRAN'.

    • wa_sort-subtot = ' '.

  • APPEND wa_sort TO l_sort.

*CLEAR WA_SORT.

*

  • CLEAR wa_sort.

*

  • wa_sort-spos = 16.

  • wa_sort-fieldname = 'EINDT'.

    • wa_sort-tabname = 'itab'.

  • wa_sort-down = 'X'.

    • wa_sort-subtot = ' '.

  • APPEND wa_sort TO l_sort.

*CLEAR WA_SORT.

*sort l_sort by spos.

ENDFORM. " f_event_sort

&----


*& Form f_validate_sel_screen

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


FORM f_validate_sel_screen .

*Tracking number

SELECT SINGLE * FROM eban WHERE bednr IN bednr.

IF sy-subrc NE 0.

MESSAGE e013.

ENDIF.

*Wbs Element

SELECT SINGLE * FROM ebkn WHERE ps_psp_pnr IN ps_psp.

IF sy-subrc NE 0.

MESSAGE e014.

ENDIF.

*Cost center

SELECT SINGLE * FROM ebkn WHERE kostl IN kostl.

IF sy-subrc NE 0.

MESSAGE e015.

ENDIF.

*Date

SELECT SINGLE * FROM ebkn WHERE erdat IN erdat.

IF sy-subrc NE 0.

MESSAGE e012.

ENDIF.

ENDFORM. " f_validate_sel_screen

Tags:
Not what you were looking for? View more on this topic or Ask a question