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: 

Why Transaction is NOT refreshing, when I used SET PARA ID??

Former Member
0 Kudos
86

Hi Experts,

I am double clicking the ALV' report's VBELN value(say, 11111111), then am getting VA23, fine!

Then, am coming back to ALV report by using F3.

But, when am clicking another VBELN(say, 22222222), still am getting the 11111111 VBELN's transaction ofVA23!

my code goes like,

<i><b>if rs_selfield-fieldname = 'VBELN'.</b></i>

<i><b>set parameter id 'AUN' field my_itab-vbeln.</b></i>

(in debug mode, the system is reading correct record from my_itab i.e. correct VBELN is coming in header)

1 - Why its not refreshing? How to fix it?

thanq.

Message was edited by:

Srikhar

Message was edited by:

Srikhar

1 ACCEPTED SOLUTION

Former Member
0 Kudos
60

Compare with this program :

report test.

type-pools : slis.

data : itab_events type slis_t_Event with header line,

it_output like vbak occurs 0 with header line,

itab_fldcat type SLIS_T_FIELDCAT_ALV.

data : v_Repid type sy-repid,

WA_FLDCAT TYPE SLIS_FIELDCAT_ALV .

start-of-selection.

v_repid = sy-repid.

select * from vbak into table it_output.

if sy-subrc = 0.

sort it_output by vbeln.

endif.

  • Field the field catalog

WA_FLDCAT-TABNAME = 'IT_OUTPUT'.

wa_fldcat-fieldname = 'VBELN'.

WA_FLDCAT-SELTEXT_M = 'Sales Document' .

WA_FLDCAT-COL_POS = 1 .

WA_FLDCAT-DDICTXT = 'M'.

WA_FLDCAT-KEY = 'X'.

WA_FLDCAT-HOTSPOT = 'X'.

append wa_fldcat to itab_fldcat.

clear wa_fldcat.

wa_fldcat-fieldname = 'AUART'.

WA_FLDCAT-TABNAME = 'IT_OUTPUT'.

WA_FLDCAT-SELTEXT_M = 'Order Type' .

WA_FLDCAT-COL_POS = 2 .

WA_FLDCAT-DDICTXT = 'M'.

append wa_fldcat to itab_fldcat.

clear wa_fldcat.

CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'

EXPORTING

  • I_INTERFACE_CHECK = ' '

  • I_BYPASSING_BUFFER =

  • I_BUFFER_ACTIVE = ' '

I_CALLBACK_PROGRAM = V_REPID

  • I_CALLBACK_PF_STATUS_SET = ' '

I_CALLBACK_USER_COMMAND = 'FRM_ALV_USER_COMMAND'* I_STRUCTURE_NAME =

  • IS_LAYOUT =

IT_FIELDCAT = ITAB_FLDCAT[]

  • IT_EXCLUDING =

  • IT_SPECIAL_GROUPS =

  • IT_SORT =

  • IT_FILTER =

  • IS_SEL_HIDE =

  • I_DEFAULT = 'X'

  • I_SAVE = ' '

  • IS_VARIANT =

  • IT_EVENTS = ITAB_EVENTS[]

  • IT_EVENT_EXIT =

  • IS_PRINT =

  • IS_REPREP_ID =

  • I_SCREEN_START_COLUMN = 0

  • I_SCREEN_START_LINE = 0

  • I_SCREEN_END_COLUMN = 0

  • I_SCREEN_END_LINE = 0

  • IMPORTING

  • E_EXIT_CAUSED_BY_CALLER =

  • ES_EXIT_CAUSED_BY_USER =

TABLES

T_OUTTAB = it_output

  • EXCEPTIONS

  • PROGRAM_ERROR = 1

  • OTHERS = 2

.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

form frm_alv_user_command USING UCOMM LIKE SY-UCOMM

SELFIELD TYPE SLIS_SELFIELD.

case ucomm.

when '&IC1'.

IF SELFIELD-TABNAME = 'IT_OUTPUT'.

IF SELFIELD-FIELDNAME = 'VBELN'.

read table it_output index SELFIELD-TABINDEX.

if sy-subrc = 0.

SET PARAMETER ID 'AUN' FIELD IT_OUTPUT-VBELN.

CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN.

endif.

endif.

endif.

endcase.

endform.

Thanks

Seshu

3 REPLIES 3

Former Member
0 Kudos
61

Compare with this program :

report test.

type-pools : slis.

data : itab_events type slis_t_Event with header line,

it_output like vbak occurs 0 with header line,

itab_fldcat type SLIS_T_FIELDCAT_ALV.

data : v_Repid type sy-repid,

WA_FLDCAT TYPE SLIS_FIELDCAT_ALV .

start-of-selection.

v_repid = sy-repid.

select * from vbak into table it_output.

if sy-subrc = 0.

sort it_output by vbeln.

endif.

  • Field the field catalog

WA_FLDCAT-TABNAME = 'IT_OUTPUT'.

wa_fldcat-fieldname = 'VBELN'.

WA_FLDCAT-SELTEXT_M = 'Sales Document' .

WA_FLDCAT-COL_POS = 1 .

WA_FLDCAT-DDICTXT = 'M'.

WA_FLDCAT-KEY = 'X'.

WA_FLDCAT-HOTSPOT = 'X'.

append wa_fldcat to itab_fldcat.

clear wa_fldcat.

wa_fldcat-fieldname = 'AUART'.

WA_FLDCAT-TABNAME = 'IT_OUTPUT'.

WA_FLDCAT-SELTEXT_M = 'Order Type' .

WA_FLDCAT-COL_POS = 2 .

WA_FLDCAT-DDICTXT = 'M'.

append wa_fldcat to itab_fldcat.

clear wa_fldcat.

CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'

EXPORTING

  • I_INTERFACE_CHECK = ' '

  • I_BYPASSING_BUFFER =

  • I_BUFFER_ACTIVE = ' '

I_CALLBACK_PROGRAM = V_REPID

  • I_CALLBACK_PF_STATUS_SET = ' '

I_CALLBACK_USER_COMMAND = 'FRM_ALV_USER_COMMAND'* I_STRUCTURE_NAME =

  • IS_LAYOUT =

IT_FIELDCAT = ITAB_FLDCAT[]

  • IT_EXCLUDING =

  • IT_SPECIAL_GROUPS =

  • IT_SORT =

  • IT_FILTER =

  • IS_SEL_HIDE =

  • I_DEFAULT = 'X'

  • I_SAVE = ' '

  • IS_VARIANT =

  • IT_EVENTS = ITAB_EVENTS[]

  • IT_EVENT_EXIT =

  • IS_PRINT =

  • IS_REPREP_ID =

  • I_SCREEN_START_COLUMN = 0

  • I_SCREEN_START_LINE = 0

  • I_SCREEN_END_COLUMN = 0

  • I_SCREEN_END_LINE = 0

  • IMPORTING

  • E_EXIT_CAUSED_BY_CALLER =

  • ES_EXIT_CAUSED_BY_USER =

TABLES

T_OUTTAB = it_output

  • EXCEPTIONS

  • PROGRAM_ERROR = 1

  • OTHERS = 2

.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

form frm_alv_user_command USING UCOMM LIKE SY-UCOMM

SELFIELD TYPE SLIS_SELFIELD.

case ucomm.

when '&IC1'.

IF SELFIELD-TABNAME = 'IT_OUTPUT'.

IF SELFIELD-FIELDNAME = 'VBELN'.

read table it_output index SELFIELD-TABINDEX.

if sy-subrc = 0.

SET PARAMETER ID 'AUN' FIELD IT_OUTPUT-VBELN.

CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN.

endif.

endif.

endif.

endcase.

endform.

Thanks

Seshu

0 Kudos
60

ThanQ Sheshu,

Where I hv to define the '&IC1' , for the following code,

<i><b>case ucomm.

when '&IC1'.</b></i>,

I guess its in SE41-MENU & in code, set pf-status 'ZMENU', Am I correct?

thanq.

0 Kudos
60

do you have any user defined push button to your ALV Layout ?

if not then &IC1 is the SAP system function code,it will come automatically,no need to define..

Just copy and paste my code and it should work

if you defined user defined push button for your alv layout also,it will come automatically.

Thanks

Seshu