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: 

SET PARAMETER ID is not working for custom parameter id

Former Member
0 Kudos

I need parameter id for Scrap(AFRUD-XMNGA) field in CO11N transaction. But the scrap field do not have the parameter id.

So I created a Parameter id (ZCN) and assigned the same to Scrap field data element RU_XMNGA. ( I used Access key to change the data element).

Data element is activated properly.

My issue is when I used the new parameter id in

SET PARAMETER ID 'ZSC' FIELD Z_CONFIRM-XMNGA statement it is not working.

Please advice

6 REPLIES 6

Former Member
0 Kudos

Hi,

Have you maintained this entry in the table TPARA.

Regards,

Atish

0 Kudos

TPARA table has an entry for my parameter id.

0 Kudos

Thank you all.

My issue is solved now.

Parameter ID is related to a screen in the transaction. I selected the field attribute of get parameter id in the Layout. Now it is working.

0 Kudos

Hi Parasu,

I am also facing the same issue.

FOr changing the field property in the screen we need Access Key.

Is there any other way in which we can do this without tampering standard screens ? My Issue is exactly same as your, I have to made Unloading point field (ABLAD) mandatory and with user specific default value. I have changed to data element with access key and added the custom parameter ID, but the ADLAD field is not gettign defaulted.

Note :

1). I have maintained the value of the custom parameter id in SU3. I haven't specifically entered anything in TPARA. Hope maintaining SU3 would do.

2). We want this field changed in 10 + transactions, so 10+ screen !!! So chaning the Get Parameter property is the worst and last option for me. Are there any other options ??

Kindly help.

Former Member
0 Kudos

Hi ,

see the set parameter id passing to transcation code for the same field in fron the program .


Example  : 1
DATA: carrier     TYPE spfli-carrid, 
      connection  TYPE spfli-connid. 

START-OF-SELECTION. 
  SELECT carrid connid 
         FROM spfli 
         INTO (carrier, connection). 
    WRITE: / carrier HOTSPOT, connection HOTSPOT. 
    HIDE:  carrier, connection. 
  ENDSELECT. 

AT LINE-SELECTION. 
  SET PARAMETER ID: 'CAR' FIELD carrier, 
                    'CON' FIELD connection. 
  CALL TRANSACTION 'DEMO_TRANSACTION'. 

Example  : 2


call function 'REUSE_ALV_GRID_DISPLAY'
       exporting
            i_callback_program      = gd_repid
            i_callback_top_of_page   = 'TOP-OF-PAGE'  
            I_callback_user_command = 'USER_COMMAND'   "see FORM 
            is_layout               = gd_layout
            it_fieldcat             = fieldcatalog[]
            i_save                  = 'X'
       tables
            t_outtab                = it_ekko
       exceptions
            program_error           = 1
            others                  = 2.

FORM user_command USING r_ucomm LIKE sy-ucomm
                  rs_selfield TYPE slis_selfield.

* Check function code
  CASE r_ucomm.
    WHEN '&IC1'.
*   Check field clicked on within ALVgrid report
    IF rs_selfield-fieldname = 'EBELN'.
*     Read data table, using index of row user clicked on
      READ TABLE it_ekko INTO wa_ekko INDEX rs_selfield-tabindex.
*     Set parameter ID for transaction screen field
      SET PARAMETER ID 'BES' FIELD wa_ekko-ebeln.  "  see here  for set  parameter
*     Sxecute transaction ME23N, and skip initial data entry screen
      CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.
    ENDIF.
  ENDCASE.


 " Example :3  for GET  parameter

DATA: para TYPE tpara-paramid VALUE 'RID', 
      prog TYPE sy-repid. 

GET PARAMETER ID para FIELD prog. 

IF sy-subrc <> 0. 
  MESSAGE 'Parameter not found' TYPE 'I'. 
ENDIF. 
ENDFORM.

reward points if it is usefull ...

Girish

Former Member
0 Kudos

You created the ID 'ZCN'

Using 'ZSC' in SET PARAMETER ID 'ZSC' FIELD Z_CONFIRM-XMNGA !!!???

Please check. is it the reason ?

Regards,

A.Singh