cancel
Showing results for 
Search instead for 
Did you mean: 

API_SEMBPS_VARIABLE_SET issues

Former Member
0 Kudos

Hello all,

I am trying to set a variable value using FM API_SEMBPS_VARIABLE_SET. But it does not get set. The variable which i try to set is 0version. the variable is of type fixed. Can some one say if i am doing any thing wrong. If any one has used this function and had it worked... any reply is really appreciated....

  • CALL FUNCTION MODULE 'API_SEMBPS_VARIABLE_SET'...

g_version = request->get_form_field( 'version' ).

ls_varsel-opt = 'EQ'.

ls_varsel-sign = 'I'.

  • ls_varsel-chanm = g_version.

ls_varsel-seqno = '0001'.

ls_varsel-low = g_version.

APPEND ls_varsel TO lt_varsel.

CALL FUNCTION 'API_SEMBPS_VARIABLE_SET'

EXPORTING

i_area = 'PAB001'

i_variable = 'VARVER'

  • i_numvalue = 'B01'

  • IS_HIESEL =

IMPORTING

e_subrc = l_subrc

es_return = ls_bapiret

TABLES

itk_varsel = lt_varsel

  • ITK_HIEDEP =

.

CALL FUNCTION 'API_SEMBPS_POST'

IMPORTING

e_subrc = l_subrc

es_return = ls_bapiret.

Thanks

Message was edited by: Sathya Gnanavelu

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

They values you are filling for ls_varsel-chanm and ls_varsel-low seems to be fishy.

Both of which you filling with g_version, which is not correct. The value to be filled for 'chanm' should be your char.name eg. VERSION and the 'low' should be filled with the version value eg. B01.

Hope this helps.

Regards,

Nataraj.

Former Member
0 Kudos

Thanks for the reply Nataraj. I had solved it on Friday and forgot to post the reply. But i really appreciate your replies.

Former Member
0 Kudos

Hi,

The FM should be fine. When you it's not working, is it the subrc returned from the FM is not zero or is it just you don't see set value in the layout/WI?

Please check the return subrc from the FM and also check the table UPC_VAR_CHA_ACT for the version variable. After the FM is called and 'POST' FM is done, this table should have entry.

try uncomment the line *ls_varsel-chanm = ...

you should be fine.

HTH,

Regards,

Nataraj.

Former Member
0 Kudos

Hello Natraj,

Thanks for your reply. The subrc doesnot return zero returns 4 am debugging the program but do u remember of top of your head as to what might be wrong.

there is no value in this table UPC_VAR_CHA_ACT

i have uncommented ls_varsel-chanm

My other question is can this variable replacement type be fixed or it has to be user defined.