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

report question

Former Member
0 Likes
1,261

1.we can display record in start-of-selection as well.then what is the use of end-of-selection.

2.why we use hide after write statement.

3.how we can use change pointer concept.if you have any program send me.thanks in advance.

10 REPLIES 10
Read only

Former Member
0 Likes
1,205

Hi Manish,

1. end-of-Selection is useful when we are using LDB's. End-of-Selection will close the loop started by GET .. statement.

2. Hide statement is used in Interactive reports. With this statement we can use the contents of the field written before HIDE in the next list .

Regards,

Sri

Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Likes
1,205

Hi,

1)END-OF-SELECTION event make sense only for executable programs which have Logical database attached to them.

In this event block, all data read by the logical data base , can be processed summarically. In an executable program without logical data base, there is no need to implement the event block END-OF-SELECTION.

.

2) HIDE Statement is used to push the DATA where the user event occurs back onto the program, so if we use HIDE the program saves that data in some global place and returns to the program when user event occurs.

Regards,

Sesh

Read only

Former Member
0 Likes
1,205

Hi manish,

Start of selection is used to fetch data from databse...thats it...to display it we need end of selection..

if u write hide st before write statement then it wil fetch the details of the next record which u clicked...

regards..

Balaji ( reward points if useful...)

Read only

kiran_k8
Active Contributor
0 Likes
1,205

1.we can display record in start-of-selection as well.then what is the use of end-of-selection.

Start of selection and end of selection are the events in ABAP.End of selection is mandatory if one is working on logical databases.

2.why we use hide after write statement.

The statement HIDE helps us developing an interactive report.Suppose if there are two fields name vbeln and erdat in your report.

If the user wants to navigate to va03 screen once he clicks the vbeln displayed in the report then this can be achieved by using Hide and at line-selection.The things is if we use HIDE even if you click on any of the fields in the row this will take you to va03(for ex).

If you want to navigate only when the user clicks on vbeln then you have to use get curso field.This way if the user clicks on erdat it will not take him to va03 but only when he clicks on vbeln.

here I am giving you a report which will drill down upto 4 levels using HIDE.

if any doubts revert it.

K.Kiran.

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

REPORT ZFLUKE no standard page heading LINE-SIZE 120 message-id zkk . .

tables: vbak,vbap,mara,ekpo.

data:begin of ivbak occurs 0,

vbeln like vbak-vbeln,

audat like vbak-audat,

ernam like vbak-ernam,

end of ivbak.

data:begin of ivbap occurs 0,

vbeln like vbap-vbeln,

posnr like vbap-posnr,

matnr like vbap-matnr,

end of ivbap.

data:begin of imara occurs 0,

matnr like mara-matnr,

mtart like mara-mtart,

mbrsh like mara-mbrsh,

matkl like mara-matkl,

spart like mara-spart,

end of imara.

data:begin of iekpo occurs 0,

ebeln like ekpo-ebeln,

ebelp like ekpo-ebelp,

matnr like ekpo-matnr,

bukrs like ekpo-bukrs,

werks like ekpo-werks,

meins like ekpo-meins,

netwr like ekpo-netwr,

end of iekpo.

data: total like ekpo-netwr.

select ebeln ebelp matnr bukrs werks meins netwr from ekpo into table iekpo where matnr = imara-matnr.

selection-screen begin of block test with frame title text-001.

select-options:s_vbeln for vbak-vbeln obligatory.

selection-screen end of block test.

****

*Basic list

****

select vbeln audat ernam from vbak into table ivbak

where vbeln in s_vbeln.

if sy-subrc = 0.

write:/'Date:-',sy-datum. "#EC NOTEXT

write:/'Time:-',sy-timlo. "#EC NOTEXT

write:/'List:-',sy-lsind. "#EC NOTEXT

uline .

WRITE:/1 sy-vline, 'Document No.' color 6, "#EC NOTEXT

15 sy-vline, 'Document Date' color 6, "#EC NOTEXT

30 sy-vline, 'Name of the Person' color 6, "#EC NOTEXT

49 sy-vline.

loop at ivbak.

uline.

write: /1 sy-vline ,

ivbak-vbeln hotspot on,

15 sy-vline,

ivbak-audat,

30 sy-vline,

ivbak-ernam,

49 sy-vline.

hide ivbak-vbeln.

endloop.

uline.

endif.

at line-selection.

***

*List 1.

***

select vbeln posnr matnr from vbap into table ivbap

where vbeln = ivbak-vbeln.

if sy-lsind = 1 .

write:/'Date:-',sy-datum. "#EC NOTEXT

write:/'Time:-',sy-timlo. "#EC NOTEXT

write:/'List:-',sy-lsind. "#EC NOTEXT

uline .

write:/1 sy-vline, 'Document No.' color 6, "#EC NOTEXT

15 sy-vline, 'Item' color 6, "#EC NOTEXT

25 sy-vline, 'Material No.' color 6, "#EC NOTEXT

41 sy-vline.

loop at ivbap.

uline .

write:/1 sy-vline,

ivbap-vbeln,

15 sy-vline,

ivbap-posnr,

25 sy-vline,

ivbap-matnr hotspot on,

41 sy-vline.

hide ivbap-matnr.

endloop.

uline .

endif.

at line-selection.

***

*List 2.

***

select matnr mtart mbrsh matkl spart from mara into table imara

where matnr = ivbap-matnr.

if sy-lsind = 2 .

write:/'Date:-',sy-datum. "#EC NOTEXT

write:/'Time:-',sy-timlo. "#EC NOTEXT

write:/'List:-',sy-lsind. "#EC NOTEXT

uline .

write:/1 sy-vline, 'Material No.' color 6, "#EC NOTEXT

18 sy-vline,'Material Type' color 6, "#EC NOTEXT

34 sy-vline,'Industrial Sector' color 6, "#EC NOTEXT

53 sy-vline,'Material Group' color 6, "#EC NOTEXT

69 sy-vline,'Division' color 6. "#EC NOTEXT

loop at imara.

uline .

write: /1 sy-vline,

imara-matnr hotspot on,

18 sy-vline,

imara-mtart,

34 sy-vline,

imara-mbrsh,

53 sy-vline,

imara-matkl,

69 sy-vline,

imara-spart.

hide imara-matnr.

endloop.

uline.

endif.

at line-selection.

select ebeln ebelp matnr bukrs werks meins netwr from ekpo into table iekpo where matnr = imara-matnr.

if sy-lsind = 3.

if sy-subrc ne 0.

Message I000(zkk).

leave to screen 0.

else.

write:/'Date:-',sy-datum."#EC NOTEXT

write:/'Time:-',sy-timlo."#EC NOTEXT

write:/'List:-',sy-lsind."#EC NOTEXT

uline .

write: /1 sy-vline, 'Pur Doc No.' color 6, "#EC NOTEXT

15 sy-vline, 'Item No. of Pur Doc' color 6, "#EC NOTEXT

35 sy-vline, 'Material No.' color 6, "#EC NOTEXT

53 sy-vline, 'Comp.Code' Color 6, "#EC NOTEXT

65 sy-vline, 'Plant' color 6, "#EC NOTEXT

73 sy-vline, 'Order Unit' color 6, "#EC NOTEXT

85 sy-vline, 'Net Ord Val' color 6, "#EC NOTEXT

103 sy-vline.

loop at iekpo.

uline.

write:/1 sy-vline,

iekpo-ebeln hotspot on,

15 sy-vline,

iekpo-ebelp,

35 sy-vline,

iekpo-matnr,

53 sy-vline,

iekpo-bukrs,

65 sy-vline,

iekpo-werks,

73 sy-vline,

iekpo-meins,

85 sy-vline,

iekpo-netwr left-justified, "#EC UOM_IN_MES

103 sy-vline.

hide iekpo-ebeln.

at end of netwr.

total = total + iekpo-netwr.

endat.

endloop.

uline.

write: /74 'Total:-','Rs.',Total left-justified. "#EC UOM_IN_MES

endif.

endif.

at line-selection.

if sy-lsind = 4.

set parameter id 'BES' field iekpo-ebeln.

call transaction 'ME23N' AND SKIP FIRST SCREEN.

endif.

Read only

Former Member
0 Likes
1,205

hi

good

start-of-selection->

Statements that are not assigned to a processing block are never executed. In executable programs, all non-declarative statements between the REPORT or PROGRAM statement and the first processing block are assigned to the default event START-OF-SELECTION. if a program does not contain an explicit START-OF-SELECTION event block, these statements form the entire START-OF-SELECTION block. If a program contains an explicitly defined START-OF-SELECTION event block, these statements are inserted at the beginning of this event block. If a program does not contain any explicit event blocks, all non-declarative statements form the processing block START-OF-SELECTION.

http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/db9a0735c111d1829f0000e829fbfe/content.htm

HIDE->

You use the HIDE technique while creating a list level to store line-specific information for later use. To do so, use the HIDE statement as follows:

HIDE or after the last output statement for the current line.

As soon as the user selects a line for which you stored HIDE fields, the system fills the variables in the program with the values stored. A line can be selected

THANKS

mrutyun^

Read only

Former Member
0 Likes
1,205

Hi,

Pls refer these threads

Read only

Former Member
0 Likes
1,205

START OF SEELECTION open the selection process.

wheteher END-OF-SELECTION end's up the selection process.

eg...

&*********************************************************************

*& S T A R T - O F - S E L E C T I O N *

&*********************************************************************

START-OF-SELECTION.

PERFORM FETCH_DATA.

PERFORM LOAD_I_TAB.

&*********************************************************************

*& E N D - O F - S E L E C T I O N *

&*********************************************************************

END-OF-SELECTION.

*Optimize and format of the layout

F_LAYOUT-COLWIDTH_OPTIMIZE = ' '.

F_LAYOUT-ZEBRA = 'X'.

  • F_LAYOUT-COLTAB_FIELDNAME = I_TAB-KUNNR.

IF I_TAB IS NOT INITIAL.

*Display Grid

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

I_GRID_TITLE = TEXT-023

IS_LAYOUT = F_LAYOUT

IT_FIELDCAT = FCAT[]

IT_SORT = I_SORT[]

TABLES

T_OUTTAB = I_TAB

EXCEPTIONS

PROGRAM_ERROR = 1

OTHERS = 2.

IF SY-SUBRC <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

ELSE.

MESSAGE I031(ZPROJ).

ENDIF.

If useful points expected.

Read only

Former Member
0 Likes
1,205

hi manish i hope u understand it.

Actually in END-OF-SELECTION the output shows and in START-OF-SELECTION selection process executes.

I think it is useful 2 u.

If so Reward me with ur Valuable POINTS.

Sanket

Read only

Former Member
0 Likes
1,205

HIDE

Stores information about list lines.

Syntax

HIDE <f>.

During list creation, this statement stores the contents of the field <f> and the current line number in the internal HIDE area. When the cursor is positioned on a line in an interactive list event, the stored value is returned to the field <f>.

Read only

Former Member
0 Likes
1,205

hi manish,

change pointer concept.....

Hi,

Change Pointers are triggered when there is a requirement to distribute data, on change in Master data.

For Eg: when a new material is added then change pointers are triggered and the Material Master is distributed to the recieving system.

Normally you configure the change pointers for large sets of master data when data has to be pumped out to the recieving system continously whenever a new material has been added to the material master.

If you want to distribute master data changes with the SMD tool (Shared Master Data), changes to the master data objects are flagged for distribution by change pointers ( ® Master Data Distribution).

The SMD tool is connected to the change document interface. If the master data changes are to be distributed, the application writes a change document. The contents of this are passed to the SMD tool. The tool writes change pointers, reads the application data and creates the master IDoc.

The master IDoc is then passed to the ALE layer, which sends it to all interested systems.

The change pointer tables (BDCP und BDCPS) should be as small as possible. Use as few change pointers as possible and delete change pointers which you no longer need.

You can increase the rate of processing by using the Analyze Change Pointer and Reorganize Change Pointer functions.

Checklist to keep the change pointer tables as small as possible:

1. Do you really need change pointers?

You need change pointers to distribute changes with the ALE SMD tool. If you do not use this tool, you do not need to write change pointers.

You can deactivate change pointers and activate them again with the transaction BD61.

2. Do you really need to activate change pointers for this messages type?

If some messages types are no longer to be distributed by change pointers, you can deactivate change pointers for this messages type.

You can deactivate change pointers for the message type

and reactivate them again.

For reduced message types, deactivate the change pointer with the

Reduction tool (transaction BD53).

From Basis Release 6.10, you can restrict the creation of change pointers in customer exits. This functionality is provided in advance in the Note 'Reducing the amount of data for change pointers' (0420562).

The report RBDCPCLR deletes processed and/or obsolete change pointers.

Features

This report deletes change pointer entries from the database tables. In Test mode, only a list of the selected entries is output. Entries are only physically deleted from the database when the test flag is not set.

You can select obsolete and/or processed change pointers, or select by date and time.

· Obsolete change pointers are those created before a specified date and time. If this flag is set, the obsolete change pointers are reorganized, whether or not they have already been processed.

· Processed change pointers are those which were processed within a specified period (date and time). If this flag is set, the processed change pointers are reorganized.

The report outputs the number of change pointers deleted, or, in test mode, selected.

Activities

1. Choose SAP Menu ® Tools ® IDoc Interface/ALE ® Administration ® Services ® Change Pointers ® Reorganize (BD22).

2. Select Test if you only want to display the selection result.

3. Specify a message type.

4. Specify whether you want to reorganize obsolete and/or processed change pointers, and run the report.

Thanks

Sanket