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

termination error while using 'VRM_SET_VALUES'

Former Member
0 Likes
341

<b></b>

I m getting program termination error:

The CODE is as follows:

MODULE status_9000 OUTPUT.

*change by satya on 31.08.2006

data:begin of ws_list occurs 0,

key(40) type c,

text(80) type c,

end of ws_list.

*data: NAME(25).

W_NAME = 'L_COMPANY_CODE'.

ws_list-key = '1'.

ws_list-text = 'GNPL'.

append ws_list.

ws_list-key = '2'.

ws_list-text = 'NIPA'.

append ws_list.

ws_list-key = '3'.

ws_list-text = 'PPL'.

append ws_list.

CALL FUNCTION 'VRM_SET_VALUES'

EXPORTING

id = W_NAME

values = ws_list.

  • EXCEPTIONS

  • ID_ILLEGAL_NAME = 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.

*end ofchange

set pf-status 'NEW'.

set titlebar 'ABC'.

l_entry_date = sy-datum.

ENDMODULE. " status_9000 OUTPUT

1 REPLY 1
Read only

Former Member
0 Likes
278

HI,

I think you check your declaration part, declare the variables with the same structure,

See the below Example program:-

  TYPE-POOLS: VRM. 
  DATA: NAME TYPE VRM_ID, 
  LIST TYPE VRM_VALUES, 
  VALUE LIKE LINE OF LIST. 
  PARAMETERS: PS_PARM(10) AS LISTBOX VISIBLE LENGTH 10. 
  AT SELECTION-SCREEN OUTPUT. 
  NAME = 'PS_PARM'. 
  VALUE-KEY = '1'. 
  VALUE-TEXT = 'LINE 1'. 
  APPEND VALUE TO LIST. 
  VALUE-KEY = '2'. 
  VALUE-TEXT = 'LINE 2'. 
  APPEND VALUE TO LIST. 
  CALL FUNCTION 'VRM_SET_VALUES' 
  EXPORTING 
  ID = NAME 
  VALUES = LIST. 
  START-OF-SELECTION. 
  WRITE: / 'PARAMETER:', PS_PARM.

See the below link for another example:-

http://www.sap-img.com/ab012.htm

Regards

Sudheer