Application Development 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: 

Use of Parameter ID

Former Member
0 Kudos

Please explain how to use the parameter Id and Search Help in Data Element Creation.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi

Search Help:

1) Elementary search helps describe a search path. The elementary search help must define where the data of the hit list should be read from (selection method), how the exchange of values between the screen template and selection method is implemented (interface of the search help) and how the online input help should be defined (online behavior of the search help).

2) Collective search helps combine several elementary search helps. A collective search help thus can offer several alternative search paths.

3)An elementary search help defines the standard flow of an input help.

4) A collective search help combines several elementary search helps. The user can thus choose one of several alternative search paths with a collective search help.

5)A collective search help comprises several elementary search helps. It combines all the search paths that are meaningful for a field.

6)Both elementary search helps and other search helps can be included in a collective search help. If other collective search helps are contained in a collective search help, they are expanded to the level of the elementary search helps when the input help is called.

CREATION:

Go to SE11 Tcode

select search help

give the 'z' search help name and create

select the selection method ur table name eg : 'mara'

dialog module 'display value immediately'.

add the field whatever u want and lpos = 1 and spos = 1 and check import and export parameter.

where left position when displaying and spos = search position

and then save and activate ..

See the links:

http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee38446011d189700000e8322d00/content.htm

http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee45446011d189700000e8322d00/content.htm

https://forums.sdn.sap.com/click.jspa?searchID=3173469&messageID=2176485

https://forums.sdn.sap.com/click.jspa?searchID=3173469&messageID=3601619

pls go through this for search help creation

http://help.sap.com/saphelp_nw2004s/helpdata/en/41/f6b237fec48c67e10000009b38f8cf/content.htm

Search Help Exits:

PARAMETER ID:

SAP memory is a memory area to which all main sessions within a SAPgui have access. You can use SAP memory either to pass data from one program to another within a session, or to pass data from one session to another. Application programs that use SAP memory must do so using SPA/GPA parameters (also known as SET/GET parameters). These parameters can be set either for a particular user or for a particular program using the SET PARAMETER statement. Other ABAP programs can then retrieve the set parameters using the GET PARAMETER statement. The most frequent use of SPA/GPA parameters is to fill input fields on screens

SAP global memory retains field value through out session.

set parameter id 'MAT' field v_matnr.

get parameter id 'MAT' field v_matnr.

They are stored in table TPARA.

after setting parameter id we use that to call the transaction using that parameter like

  • Set parameter ID for transaction screen field

SET PARAMETER ID 'VL' FIELD wa_item_tab-vbeln.

CALL TRANSACTION 'VL03N' AND SKIP FIRST SCREEN.

Reward points for useful Answers

Regards

Anji

7 REPLIES 7

Former Member
0 Kudos

Hi,

By giving the parameter ID the field value that is using the dataelement will be retained across sessions..You can create new parameter ID in sm30 for the table TPARA.

By giving the search help the screen that is using the data element will automatically get the F4 helps

Thanks

Naren

Former Member
0 Kudos

Hi

Search Help:

1) Elementary search helps describe a search path. The elementary search help must define where the data of the hit list should be read from (selection method), how the exchange of values between the screen template and selection method is implemented (interface of the search help) and how the online input help should be defined (online behavior of the search help).

2) Collective search helps combine several elementary search helps. A collective search help thus can offer several alternative search paths.

3)An elementary search help defines the standard flow of an input help.

4) A collective search help combines several elementary search helps. The user can thus choose one of several alternative search paths with a collective search help.

5)A collective search help comprises several elementary search helps. It combines all the search paths that are meaningful for a field.

6)Both elementary search helps and other search helps can be included in a collective search help. If other collective search helps are contained in a collective search help, they are expanded to the level of the elementary search helps when the input help is called.

CREATION:

Go to SE11 Tcode

select search help

give the 'z' search help name and create

select the selection method ur table name eg : 'mara'

dialog module 'display value immediately'.

add the field whatever u want and lpos = 1 and spos = 1 and check import and export parameter.

where left position when displaying and spos = search position

and then save and activate ..

See the links:

http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee38446011d189700000e8322d00/content.htm

http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee45446011d189700000e8322d00/content.htm

https://forums.sdn.sap.com/click.jspa?searchID=3173469&messageID=2176485

https://forums.sdn.sap.com/click.jspa?searchID=3173469&messageID=3601619

pls go through this for search help creation

http://help.sap.com/saphelp_nw2004s/helpdata/en/41/f6b237fec48c67e10000009b38f8cf/content.htm

Search Help Exits:

PARAMETER ID:

SAP memory is a memory area to which all main sessions within a SAPgui have access. You can use SAP memory either to pass data from one program to another within a session, or to pass data from one session to another. Application programs that use SAP memory must do so using SPA/GPA parameters (also known as SET/GET parameters). These parameters can be set either for a particular user or for a particular program using the SET PARAMETER statement. Other ABAP programs can then retrieve the set parameters using the GET PARAMETER statement. The most frequent use of SPA/GPA parameters is to fill input fields on screens

SAP global memory retains field value through out session.

set parameter id 'MAT' field v_matnr.

get parameter id 'MAT' field v_matnr.

They are stored in table TPARA.

after setting parameter id we use that to call the transaction using that parameter like

  • Set parameter ID for transaction screen field

SET PARAMETER ID 'VL' FIELD wa_item_tab-vbeln.

CALL TRANSACTION 'VL03N' AND SKIP FIRST SCREEN.

Reward points for useful Answers

Regards

Anji

0 Kudos

That is ok but when we create data element their is an option for parameter Id so wt is the use of that parameter id.

0 Kudos

Hi Swati,

This parameter ID is useful when you are using CALL TRANSACTION.

For eg. just go and check parameter ID of standard data element BUKRS it is BUK , so lets say you want to call the transaction FB03 which requires BUKRS to be given then you can pass the value using parameter ID and when you use CALL TRANSACTION that value will be there already.

In simple terms it is used to pass values between programs for a particular field(Data element).

Reward points if useful.

Regards,

Atish

0 Kudos

Thanks your reply is very useful.

Former Member
0 Kudos

hi,

explain how to use the parameter Id ?

It is used to retain the value across screens/sessions.for creating parameter ID goto sm30 give the table TPARA->set/get parameter id

use with example:mainly used for traversing from report to transactions.

REPORT ZSR_ALV_INTERACTIVE.

TABLES : LFA1,EKKO,EKPO.

SELECT-OPTIONS : VENDOR FOR LFA1-LIFNR.

DATA : BEGIN OF ITAB OCCURS 0,

LIFNR LIKE LFA1-LIFNR,

NAME1 LIKE LFA1-NAME1,

END OF ITAB.

DATA : BEGIN OF JTAB OCCURS 0,

EBELN LIKE EKKO-EBELN,

AEDAT LIKE EKKO-AEDAT,

END OF JTAB.

DATA : BEGIN OF KTAB OCCURS 0,

EBELP LIKE EKPO-EBELP,

MATNR LIKE EKPO-MATNR,

END OF KTAB.

TYPE-POOLS : SLIS.

DATA : REPID LIKE SY-REPID.

DATA :LFA1_B TYPE SLIS_T_FIELDCAT_ALV,

LFA1_W TYPE SLIS_FIELDCAT_ALV,

EKKO_B TYPE SLIS_T_FIELDCAT_ALV,

EKKO_W TYPE SLIS_FIELDCAT_ALV,

EKPO_B TYPE SLIS_T_FIELDCAT_ALV,

EKPO_W TYPE SLIS_FIELDCAT_ALV,

EVENTS_B TYPE SLIS_T_EVENT,

EVENTS_W TYPE SLIS_ALV_EVENT.

PERFORM GET_VAL.

REPID = SY-REPID.

SELECT LIFNR NAME1 FROM LFA1 INTO TABLE ITAB WHERE LIFNR IN VENDOR.

*perform val USING USER_COMMAND sel.

CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'

EXPORTING

I_CALLBACK_PROGRAM = REPID

IT_FIELDCAT = LFA1_B

IT_EVENTS = EVENTS_B

TABLES

T_OUTTAB = ITAB.

FORM GET_VAL.

LFA1_W-FIELDNAME = 'LIFNR'.

LFA1_W-REF_TABNAME = 'LFA1'.

LFA1_W-REF_FIELDNAME = 'LIFNR'.

APPEND LFA1_W TO LFA1_B.

LFA1_W-FIELDNAME = 'NAME1'.

LFA1_W-REF_TABNAME = 'LFA1'.

LFA1_W-REF_FIELDNAME = 'NAME1'.

APPEND LFA1_W TO LFA1_B.

EKKO_W-FIELDNAME = 'EBELN'.

EKKO_W-REF_TABNAME = 'EKKO'.

EKKO_W-REF_FIELDNAME = 'EBELN'.

APPEND EKKO_W TO EKKO_B.

EKKO_W-FIELDNAME = 'AEDAT'.

EKKO_W-REF_TABNAME = 'EKKO'.

EKKO_W-REF_FIELDNAME = 'AEDAT'.

APPEND EKKO_W TO EKKO_B.

EKPO_W-FIELDNAME = 'EBELP'.

EKPO_W-REF_TABNAME = 'EKPO'.

EKPO_W-REF_FIELDNAME = 'EBELP'.

APPEND EKPO_W TO EKPO_B.

EKPO_W-FIELDNAME = 'MATNR'.

EKPO_W-REF_TABNAME = 'EKPO'.

EKPO_W-REF_FIELDNAME = 'MATNR'.

APPEND EKPO_W TO EKPO_B.

EVENTS_W-NAME = 'USER_COMMAND'.

EVENTS_W-FORM = 'VAL'.

APPEND EVENTS_W TO EVENTS_B.

ENDFORM. "GET_VAL

FORM VAL USING USER_COMMAND LIKE SY-UCOMM SEL TYPE SLIS_SELFIELD.

DATA : VEN(10) TYPE N,

PO(10) TYPE N.

DATA : MAT(10) TYPE C.

IF SEL-FIELDNAME = 'LIFNR'.

VEN = SEL-VALUE.

SELECT EBELN AEDAT FROM EKKO INTO TABLE JTAB WHERE LIFNR = VEN.

CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'

EXPORTING

I_CALLBACK_PROGRAM = REPID

  • I_STRUCTURE_NAME = EKKO_B

IT_FIELDCAT = EKKO_B

IT_EVENTS = EVENTS_B

TABLES

T_OUTTAB = JTAB.

ENDIF.

IF SEL-FIELDNAME = 'EBELN'.

PO = SEL-VALUE.

SELECT EBELP MATNR FROM EKPO INTO TABLE KTAB WHERE EBELN = PO.

CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'

EXPORTING

I_TITLE = 'ITEM DETAILS'

I_TABNAME = 'EKPO'

IT_FIELDCAT = EKPO_B

I_CALLBACK_PROGRAM = REPID

IMPORTING

ES_SELFIELD = SEL

TABLES

T_OUTTAB = KTAB.

ENDIF.

  • logic to select a record

IF SEL-FIELDNAME = 'MATNR'.

<b>MAT = SEL-VALUE.

SET PARAMETER ID 'MAT' FIELD MAT.</b> CALL TRANSACTION 'MM02' AND SKIP FIRST SCREEN.

ENDIF.

ENDFORM. "VAL

Search Help :

http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee38446011d189700000e8322d00/content.htm

http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee45446011d189700000e8322d00/content.htm

pls go through this for search help creation

http://help.sap.com/saphelp_nw2004s/helpdata/en/41/f6b237fec48c67e10000009b38f8cf/content.htm

Former Member
0 Kudos

Hi,

Please check my reply

Thanks

Naren