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

Set Parameter problem

Former Member
0 Likes
1,330

my code is like this

START-OF-SELECTION.

SELECT * FROM SBOOK UP TO 10 ROWS.

WRITE: / sbook-carrid, sbook-connid, sbook-fldate, sbook-bookid.

HIDE: SBOOK-CARRID, SBOOK-CONNID,

SBOOK-FLDATE, SBOOK-BOOKID.

ENDSELECT.

AT LINE-SELECTION.

set parameter id 'CAR' field sbook-CARRID.

set parameter id 'CON' field sbook-CONNID.

set parameter id 'DAY' field sbook-FLDATE.

set parameter id 'BOK' field sbook-BOOKID.

call transaction 'ZSBOOK'

when i click on any line, the values are not coming on screen( ie in zsbook tcode ). what's the problem ?

Thanks, points for sure

11 REPLIES 11
Read only

Former Member
0 Likes
1,252

Hi Naveen,

Are you sure, you are using the same parameters as the screen fields in your ZBOOK transaction.

I.e go to your zbook transaction and see if the parameter IDs atre indeed the same ones you have used in your At line-selection code.

Regards,

Ravi

Read only

Former Member
0 Likes
1,252

Hi,

I think it is case sensitive.

try

set parameter id 'CAR' field SBOOK-CARRID.

set parameter id 'CON' field SBOOK-CONNID.

set parameter id 'DAY' field SBOOK-FLDATE.

set parameter id 'BOK' field SBOOK-BOOKID.

call transaction 'ZSBOOK'

Hope this helps..

Regards,

Shashank

Read only

0 Likes
1,252

Hi,

I tried this out. This works...

<b>Instead of CALL TRANSACTION use SUBMIT REPORT VIA SELECTION-SCREEN.</b>Specify your program name in SUBMIT...

START-OF-SELECTION.
TABLES: SBOOK.
SELECT * FROM SBOOK UP TO 10 ROWS.
WRITE: / sbook-carrid, sbook-connid, sbook-fldate, sbook-bookid.

HIDE: SBOOK-CARRID, SBOOK-CONNID,
SBOOK-FLDATE, SBOOK-BOOKID.

ENDSELECT.

AT LINE-SELECTION.
set parameter id 'CAR' field sbook-CARRID.
set parameter id 'CON' field sbook-CONNID.
set parameter id 'DAY' field sbook-FLDATE.
set parameter id 'BOK' field sbook-BOOKID.

<b>
SUBMIT ZREPORT VIA SELECTION-SCREEN.</b>

In your report...
<b>REPORT ZREPORT.</b>
PARAMETERS : carrid LIKE sbook-CARRID.

<b>INITIALIZATION.</b>
<b>GET PARAMETER ID 'CAR' field carrid.</b>
"And similarly for all fields

Read only

venkata_ramisetti
Active Contributor
0 Likes
1,252

Hi,

YOu have to add parameter ids for these 4 fields in the screen painter.

set parameter id 'CAR' field sbook-CARRID.

set parameter id 'CON' field sbook-CONNID.

set parameter id 'DAY' field sbook-FLDATE.

set parameter id 'BOK' field sbook-BOOKID.

THanks,

Ramakrishna

Read only

Former Member
0 Likes
1,252

Hi Naveen,

After u set parameter id...to get the values you need to use get parameter id...

hope this helps,

thanks,

priya

Read only

vinod_gunaware2
Active Contributor
0 Likes
1,252

HIDE

The HIDE statement is one of the fundamental statements for interactive reporting. You use the HIDE technique when creating a basic list. It defines the information that can be passed to subsequent detail lists.

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 <f>.

This statement places the contents of the variable <f> for the current output line (system field SY-LINNO) into the HIDE area. The variable <f> must not necessarily appear on the current line.

To make your program more readable, always place the HIDE statement directly after the output statement for the variable <f> 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

by an interactive event.

For each interactive event, the HIDE fields of the line on which the cursor is positioned during the event are filled with the stored values.

by the READ LINE statement.

You can think of the HIDE area as a table, in which the system stores the names and values of all HIDE fields for each list and line number. As soon as they are needed, the system reads the values from the table.

The example below presents some of the essential features of interactive reporting. The basic list contains summarized information. By means of the HIDE technique, each detail list contains more details.

u can use

To read a line from a list after an interactive list event, use the READ LINE statement:

READ LINE <lin> [INDEX <idx>]

[FIELD VALUE <f1> [INTO <g 1>] ... <f n> [INTO <g n>]]

[OF CURRENT PAGE|OF PAGE <p>].

SET PARAMETER ID <pid> FIELD <f>.

This statement saves the contents of field <f> under the ID <pid> in the SAP memory. The code <pid> can be up to 20 characters long. If there was already a value stored under <pid>, this statement overwrites it. If the ID <pid> does not exist, double-click <pid> in the ABAP Editor to create a new parameter object.

<b>Before call transaction print content on output.

Check it out.</b>

regards

vinod

Read only

Former Member
0 Likes
1,252

Hi Naveen,

Check the screen field, if the parameter id is set to it or not. goto the field press F1, goto technical info and see if it shows the parameter id If no then -> You have to set the attribute of the screen fields to parameter ID.

Also you should maintain the parameter IDs in table TPARA, if it is a custom created Parameter

Hope it helps...

Lokesh

Read only

Former Member
0 Likes
1,252

Hi naveen,

Ur line selection / hide is working fine.

But

1. many a times, this set parameter id

does not work when we call new transaction

from our abap code.

2. for this purpose,

use like this :

call transaction using bdcdata.

where in u fill this bdcdata

with the screen numbers,

and corresponding field names, and their values,

which u want.

regards,

amit m.

Read only

vinod_gunaware2
Active Contributor
0 Likes
1,252

Hi

I have checked ur report. I think u have given <b>wrong data element to ur transaction ZSBOOk.</b>Check data element of sbook i.e.CARRID CONNID FLDATE BOOKID.

<b>Use in ur Screen/parameters/select-options for ZSBOOK.</b>

It will definately useful.

regards

vinod

Read only

Former Member
0 Likes
1,252

Hi Naveen,

I don't see any problem in the code.

The problem may be with the transaction 'ZSBOOK'.

Check the screen of transaction 'ZSBOOK' whether you have defined the fields with the same parameter ids or not?

Regards,

Neeraj Gupta

Read only

Former Member
0 Likes
1,252

Hi

Probably the input/output field sbook-CARRID, sbook-CONNID, sbook-FLDATE and sbook-BOOKID aren't arranged to get the value from those SET/GET parameters.

See the input/output attributes of those fields in your screen: see if GET PARAMETERS attribute is active.

Or change the abap code of your trx in this way:

get parameter id 'CAR' field sbook-CARRID.

get parameter id 'CON' field sbook-CONNID.

get parameter id 'DAY' field sbook-FLDATE.

get parameter id 'BOK' field sbook-BOOKID.

Max