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

Problem in ABAP code.

Former Member
0 Likes
775

hi,

below is part of my code.when i click on any PO no. on output screen , it goes to me22 screen for last PO displayed on output screen.Instead it should go to me22 screen on PO no. i click ..Can anyone plz help me n tell me the problem.

write :/1 itab_out1-f_ebeln COLOR 5 HOTSPOT ON,

20 itab_out1-f_lifnr,

45 itab_out1-f_name1,

60 itab_out1-f_matnr,

80 itab_out1-f_aedat,

100 itab_out1-f_ebelp ,

108 itab_out1-f_netpr,

/,

/100'TOTAL',

108 itab_out1-f_price color 3.

HIDE: ITAB_OUT1-F_EBELN.

endloop.

ENDFORM.

AT LINE-SELECTION.

SET PARAMETER ID 'BES' FIELD itab_out1-f_ebeln.

CALL TRANSACTION 'ME22'.

8 REPLIES 8
Read only

Former Member
0 Likes
752

hi,

put the hotspot on for EBELN only..

and use hide stmt for that EBELN.

not for all fields.

and capture the USER-COMMAND in event catelog

dummy code for user-command

FORM user_command USING r_ucomm LIKE syst-ucomm

rs_selfield TYPE slis_selfield.

CONSTANTS:

lc_x(1) TYPE c VALUE 'X'.

IF r_ucomm = '&IC1'.

CASE rs_selfield-fieldname.

WHEN 'VBELN'.

  • When Sales Order Document is selected...

SET PARAMETER ID 'AUN' FIELD rs_selfield-value.

CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN .

ENDCASE.

ENDIF.

rs_selfield-refresh = lc_x.

ENDFORM. "USER_COMMAND

<b>Reward points if useful</b>

Chandra

Message was edited by:

Chandra

Read only

0 Likes
752

try using HIDE option also for this ebeln field.

Read only

0 Likes
752

i have used hide option, bt still its not working.

Read only

Former Member
0 Likes
752

Hide statement stores - in the current list level - the content of the variable dobj together with the current list line whose line number is contained in sy-linno.

Here u have used hide statement in the loop so loop executes for all the records into the internal table.

And lastly by hide statement only the last PO number is present in the current list level.

now after u r clicking on whatever the numbet but, in the <b>itab_out1-f_ebeln</b>

only last PO number is present.

So u are facing this problem.

thanks

Dharmishta

Read only

0 Likes
752

loop at itab_out1.

write :

/1 itab_out1-f_ebeln COLOR 5 HOTSPOT ON,

20 itab_out1-f_lifnr,

45 itab_out1-f_name1,

60 itab_out1-f_matnr,

80 itab_out1-f_aedat,

100 itab_out1-f_ebelp ,

108 itab_out1-f_netpr,

/,

/100'TOTAL',

108 itab_out1-f_price color 3.

HIDE: itab_out1-f_ebeln.

endloop.

ENDFORM.

AT LINE-SELECTION.

SET PARAMETER ID 'BES' FIELD itab_out1-f_ebeln.

CALL TRANSACTION 'ME22'.

Read only

0 Likes
752

i tried using hide inside and outside loop.bt still its not working.

Code is :

loop at itab_out1.

write :

/1 itab_out1-f_ebeln COLOR 5 HOTSPOT ON,

20 itab_out1-f_lifnr,

45 itab_out1-f_name1,

60 itab_out1-f_matnr,

80 itab_out1-f_aedat,

100 itab_out1-f_ebelp ,

108 itab_out1-f_netpr,

/,

/100'TOTAL',

108 itab_out1-f_price color 3.

HIDE: itab_out1-f_ebeln.

endloop.

ENDFORM.

AT LINE-SELECTION.

SET PARAMETER ID 'BES' FIELD itab_out1-f_ebeln.

CALL TRANSACTION 'ME22'.

Read only

0 Likes
752

Hi Friend,

Try by giving Hide statement inside At Line selection.

Because only after Line selection The value is assigned to That Field.

Read only

Former Member
0 Likes
752

done.