Application Development and Automation 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: 
Read only

abap select options not working

0 Likes
2,320

Hello friends,

I can make report using select options but It does not work the way I want . When I debug the project , First execute not filtering . I am pushing back , don't change anything. Secondary execute is true working. Why does not the first execution , I don't understand.

I would appreciate if you can help .Thank you in advance

TABLES : ZQM_T001,ZPP_T004,MAKT,PA0001,AUFK,ZPP_T001.

DATA : TLBARKOD TYPE ZQM_T001-ZTBARKOD .

SELECT-OPTIONS : TBARKOD  FOR ZQM_T001-ZTBARKOD .

SELECT-OPTIONS : KKTARIH  FOR ZQM_T001-CRDAT.

SELECT-OPTIONS : KKSAAT   FOR ZQM_T001-CRUZT.

SELECT-OPTIONS : KBARKOD  FOR ZPP_T004-BARKOD.

SELECT-OPTIONS : SIPNO    FOR ZPP_T004-AUFNR.

SELECT-OPTIONS : MALZNO   FOR ZPP_T004-MATNR.

SELECT-OPTIONS : PARTINO  FOR ZQM_T001-ZPARTI.

SELECT-OPTIONS : URTPERNO FOR ZPP_T004-PERNR.

SELECT-OPTIONS : TRTMTAR  FOR ZPP_T004-CRDAT.

SELECT-OPTIONS : TRTMSAAT FOR ZPP_T004-CRUZT.

*

"CALL SCREEN 0111.

*

**----------------------------------------------------------------------*

**  MODULE STATUS_0111 OUTPUT

**----------------------------------------------------------------------*

**

**----------------------------------------------------------------------*

MODULE status_0111 OUTPUT.

   SET PF-STATUS 'STATUS111'.

ENDMODULE.

*

MODULE user_command_0111 INPUT.

   CASE sy-ucomm.

     WHEN 'CIKIS'.

       CLEAR sy-ucomm.

       LEAVE PROGRAM.

     WHEN 'EXECUTE'.

       TLBARKOD = TBARKOD.

...

Hello friends,

I can make report using select options but It does not work the way I want . When I debug the project , First execute not filtering . I am pushing back , don't change anything. Secondary execute is true working. Why does not the first execution , I don't understand.

I would appreciate if you can help .Thank you in advance

TABLES : ZQM_T001,ZPP_T004,MAKT,PA0001,AUFK,ZPP_T001.

DATA : TLBARKOD TYPE ZQM_T001-ZTBARKOD .

SELECT-OPTIONS : TBARKOD  FOR ZQM_T001-ZTBARKOD .

SELECT-OPTIONS : KKTARIH  FOR ZQM_T001-CRDAT.

SELECT-OPTIONS : KKSAAT   FOR ZQM_T001-CRUZT.

SELECT-OPTIONS : KBARKOD  FOR ZPP_T004-BARKOD.

SELECT-OPTIONS : SIPNO    FOR ZPP_T004-AUFNR.

SELECT-OPTIONS : MALZNO   FOR ZPP_T004-MATNR.

SELECT-OPTIONS : PARTINO  FOR ZQM_T001-ZPARTI.

SELECT-OPTIONS : URTPERNO FOR ZPP_T004-PERNR.

SELECT-OPTIONS : TRTMTAR  FOR ZPP_T004-CRDAT.

SELECT-OPTIONS : TRTMSAAT FOR ZPP_T004-CRUZT.

*

"CALL SCREEN 0111.

*

**----------------------------------------------------------------------*

**  MODULE STATUS_0111 OUTPUT

**----------------------------------------------------------------------*

**

**----------------------------------------------------------------------*

MODULE status_0111 OUTPUT.

   SET PF-STATUS 'STATUS111'.

ENDMODULE.

*

MODULE user_command_0111 INPUT.

   CASE sy-ucomm.

     WHEN 'CIKIS'.

       CLEAR sy-ucomm.

       LEAVE PROGRAM.

     WHEN 'EXECUTE'.

       TLBARKOD = TBARKOD.

...

4 REPLIES 4
Read only

Former Member
0 Likes
1,735

Hi Alper,

There is probably code you implemented in PAI, that should be in PBO.

That way, that code is only executing in PAI after you run the first time. When you run the second time, your data is ready from the previous PAI. That's why it works.

Am I clear?

Regards,

Thales Schmidt

Read only

VenkatRamesh_V
Active Contributor
0 Likes
1,735

Hi,

if you are using report with a type 'MODULE POOL', Declare.

ABAP EDITOR .

SELECTION-SCREEN BEGIN OF SCREEN  200 AS SUBSCREEN.

SELECT-OPTIONS:  s_plt   for resb-werks no intervals DEFAULT '1000' OBLIGATORY,

                  s_ven   for ekko-lifnr obligatory,

                  s_dat   for ekko-bedat,

                  s_po    for ekko-ebeln,

                  s_mat   for ekpo-matnr,

                  s_comp  for resb-matnr,

                  s_ord   for resb-kdauf.

SELECTION-SCREEN SKIP 1.

SELECTION-SCREEN COMMENT /1(50) text-001.

SELECT-OPTIONS:  s_rloc  for mseg-umlgo no intervals no-extension.

SELECTION-SCREEN END   OF SCREEN 200 .

SCREEN PAINTER.

PROCESS BEFORE OUTPUT.

  MODULE STATUS_0100.

Call subscreen SEL including sy-repid '200'.

Hope it helpful,

Regards,

Venkat.V

Read only

0 Likes
1,735

Thanks friends ,

Editing PAI modüle after I solved problem.

Thanks again,good work.


Read only

0 Likes
1,735

Nice. Now can you please close the discussion?