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

Calling a transaction

Former Member
0 Likes
1,184

Hi all,

I have a selection screen from which depending upon what the user has selected runs a transaction(PEPM) or a report.

I want to pass the login field name to the transaction PEPM input field(DYNP_RHPP-SEARK1). I also want this field to be disabled that is the login name should be populated in the field and the user should not be able to edit the same.

Thanks & Regards,

Vijith

Hi all,

I have a selection screen from which depending upon what the user has selected runs a transaction(PEPM) or a report.

I want to pass the login field name to the transaction PEPM input field(DYNP_RHPP-SEARK1). I also want this field to be disabled that is the login name should be populated in the field and the user should not be able to edit the same.

Thanks & Regards,

Vijith

8 REPLIES 8
Read only

Former Member
0 Likes
1,101

Hi,

For disabling,

use loop at screen option.

For setting login name, u can set a parameter id for that and assign the value

Sreedhar

Read only

0 Likes
1,101

Hi,

I have not worked much in ABAP so can u help me with some code or a tutorial.

Let me be clear in my requirement that when the user selects to run a transaction it should not be completely executed but the login name should be filled into the first page and the execution of transaction from there should be left to the user.

Thanks & Regards,

Vijith

Read only

rahulkavuri
Active Contributor
0 Likes
1,101

transaction and parameter field accordingly edited

hi if u want to pass a value which u already know then just replace RS_SELFIELD-VALUE with the value u want...

FORM USER_COMMAND USING R_UCOMM     LIKE SY-UCOMM
                               RS_SELFIELD TYPE SLIS_SELFIELD.

  CASE R_UCOMM.
    WHEN 'BACK' OR 'CANC' OR 'EXIT'.
      LEAVE TO SCREEN 0.

    WHEN '&IC1'.
      <b>SET PARAMETER ID 'DFD' FIELD Sy-UNAME.      
CALL TRANSACTION 'PEPM' AND SKIP FIRST SCREEN.</b>
  ENDCASE.

ENDFORM.                    "USER_COMMAND

<b>for disabling a field</b>

AT SELECTION-SCREEN OUTPUT .

  LOOP AT SCREEN.

    IF SCREEN-NAME = 'S_FKDAT'.
      SCREEN-INPUT = 0.
      MODIFY SCREEN.
    ENDIF.

  ENDLOOP.

<b>Please award points if it helps</b>

Read only

dani_mn
Active Contributor
0 Likes
1,101

Use parameter ID SAP memory to pass value into field and to disable field use.

LOOP AT screen.

If screen-name = 'abc'.

screen-active = '0'.

modify screen.

endif.

ENDLOOP.

regards ,

Wasim Ahmed

Read only

Former Member
0 Likes
1,101

Hi,

Try code ; Cut paste and run.

This what u want.

SELECTION-SCREEN : BEGIN OF BLOCK options WITH FRAME TITLE text-003,
                   BEGIN OF LINE.
PARAMETERS       : p_backgd RADIOBUTTON GROUP rad1
                   USER-COMMAND radio.
SELECTION-SCREEN : COMMENT 4(10) text-006,
                 : POSITION 35.
PARAMETERS       : p_sumrep RADIOBUTTON GROUP rad1 default 'X' .
SELECTION-SCREEN : COMMENT 38(10) text-048,
                   END OF LINE.
SELECTION-SCREEN : END OF BLOCK options.


*----------------File
SELECTION-SCREEN : BEGIN OF BLOCK file WITH FRAME TITLE text-052.
PARAMETERS       : p_sumfl TYPE char255 modif id ABC  .
PARAMETERS       : p_detfl TYPE char255 modif id ABC.
SELECTION-SCREEN : END OF BLOCK file.

*---------------Activate & Deactivate Screen Fields--------------------*
AT SELECTION-SCREEN OUTPUT.

  LOOP AT SCREEN.
    IF p_sumrep = 'X'.
      IF screen-group1  = 'ABC'.
        screen-input  = '0'.
        MODIFY SCREEN.
      ENDIF.
    ENDIF.
  ENDLOOP.


INITIALIZATION.
p_detfl = 'ABC'.

Message was edited by: Manoj Gupta

Read only

0 Likes
1,101

Hi,

I think my requirement is not clear.........

I have a program <i>zmyprg</i>it has a initial screen consisting of two radio buttons. The user logged in can select whether to run a transaction or report based on the radio button selectio.

The transaction i intend to run is PEPM and it is for this transaction i want the field DYNP_RHPP-SEARK1 to be disabled.

The other radio button selection runs a report.

Expecting ur great help.

Thanks & Regards,

Vijith

Read only

0 Likes
1,101

Hi Vijith,

YOu cannot do what you explained.

YOu can only take the user to the first screen of the transaction.

if rb1 = 'X'.

call transaction 'PEPM'. "Takes you to the pepm first screen.

endif.

Regards,

Ravi

Read only

0 Likes
1,101

Hi Vijith,

It is not possible because.

1) Field belong to different transaction ;so u cant disable.

2) Field ( User Name ) does not have parameter ID hence u cant set the value for the field.