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

Packet size and selection screen

Former Member
0 Likes
1,065

hi all.,

i have a requirement where user just need to give the no. of records to be processesed for a execution of a report.

i am using packet size were the user gives the no. of records he want to be executed in a report.

Please let me know how to use packet size in my selection screen

thnkx

bhanu

hi all.,

i have a requirement where user just need to give the no. of records to be processesed for a execution of a report.

i am using packet size were the user gives the no. of records he want to be executed in a report.

Please let me know how to use packet size in my selection screen

thnkx

bhanu

3 REPLIES 3
Read only

Former Member
0 Likes
742

Hi,

Just define as

PARAMETERS pac_siz TYPE I.

and use pac_siz in the select query.

Regards,

Atish

Read only

Former Member
0 Likes
742

hi,

check this code regarding packagr size ,no of records to be processed to get out put in report,

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

TABLES : mkpf,

mseg,

zamatdoc,

mara.

DATA :BEGIN OF gi_mkpf OCCURS 100,

mblnr LIKE mkpf-mblnr,

mjahr LIKE mkpf-mjahr,

END OF gi_mkpf.

  • data gi_mseg like zamatdoc occurs 100 with header line.

DATA: BEGIN OF gi_mseg OCCURS 0.

INCLUDE STRUCTURE zamatdoc.

DATA: END OF gi_mseg.

DATA: gv_date(11)," LIKE ekpo-aedat,

gv_date1(11),

year(4),

month(2),

day(2),

flag(1),

read_flag(1).

DATA :char TYPE i,

count TYPE i.

*select-options : s_mtart for mara-mtart obligatory.

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

SELECT-OPTIONS : records FOR char. " OBLIGATORY.

SELECTION-SCREEN : END OF BLOCK b1.

START-OF-SELECTION.

gv_date1 = sy-datum.

year = gv_date1+0(4).

month = gv_date1+4(2).

day = gv_date1+6(2).

year = year - 3.

CLEAR gv_date1.

CONCATENATE year month day INTO gv_date1.

  • CONCATENATE day month year INTO gv_date1.

SELECT mblnr

mjahr

FROM mkpf

INTO TABLE gi_mkpf

WHERE budat <= gv_date1.">" and BUDAT >= ).

IF sy-subrc = 0.

SORT gi_mkpf BY mblnr.

DELETE ADJACENT DUPLICATES FROM gi_mkpf.

CLEAR count.

IF NOT gi_mkpf[] IS INITIAL.

IF NOT records-low IS INITIAL .

IF NOT records-high IS INITIAL.

DESCRIBE TABLE gi_mkpf LINES count.

IF records-high < count.

DELETE gi_mkpf FROM records-high TO count.

ENDIF.

IF records-low <> 1.

IF records-low <> 0.

DELETE gi_mkpf FROM 1 TO records-low.

ENDIF.

ENDIF.

ENDIF.

ENDIF.

ENDIF.

SELECT matnr werks FROM mseg INTO CORRESPONDING FIELDS OF TABLE gi_mseg

PACKAGE SIZE 100 FOR ALL ENTRIES IN gi_mkpf

WHERE mblnr = gi_mkpf-mblnr

AND mjahr = gi_mkpf-mjahr.

MODIFY zamatdoc FROM TABLE gi_mseg.

COMMIT WORK.

ENDSELECT.

regards

siva

Read only

Former Member
0 Likes
742

hi,,

try like this,

PARAMETERS pac_siz TYPE I.

in select query try like this,

select matnr maktx ernam ersda from mara into table itab where matnr = pac_size

or use up to n rows instead of pac_size for specific no. of records.

if helpful reward some points.

with regards,

Suresh Aluri.