Skip to Content
0
Former Member
Dec 01, 2009 at 01:40 AM

Help /DSD/BAPI_VL_CHANGEFROMDATA

103 Views

Hi community,

I hope you can help me.

Someone of you guys have used the bapi /DSD/BAPI_VL_CHANGEFROMDATA?

I have a requirement in which it ask to use this bapi to update/maintain the text in DSD: Visit List.

The manual method to maintain this text is to go to /DSD/VC_VL transaction, populate the Visit List ID field and then in the next screen select a customer asigned to the list and then click on Texts button.

To view the text, go to /DSD/VC_VL_VIEW transaction, populate the Visit List ID field, select the customer asigned to the list and then click on Texts button.

I have made a little test with the BAPI, here is the code:

DATA: v_vlid    TYPE /dsd/bapi_vc_vl-visitlist_id,
      w_vlh_out TYPE /dsd/bapi_vc_vlhout,
      i_return  TYPE STANDARD TABLE OF bapiret2,
      i_vltext  TYPE STANDARD TABLE OF /dsd/bapi_vc_vl_text.

DATA w_vltext TYPE /dsd/bapi_vc_vl_text.

v_vlid = '0000000036'.

w_vltext-visitlist_id = v_vlid.
w_vltext-visitlist_pos = '1'.
w_vltext-langu = sy-langu.
w_vltext-text_line = 'Texto de Prueba'.
APPEND w_vltext TO i_vltext.


CALL FUNCTION '/DSD/BAPI_VL_CHANGEFROMDATA'
  EXPORTING
    visitlist_id = v_vlid
  IMPORTING
    vlh_out      = w_vlh_out
  TABLES
    vltext_in    = i_vltext
    return       = i_return.

When I execute this code, the I_RETURN internal table returns a record with the next message:

Instance 0000000036 of object type VL has been changed.

But when I go to the /DSD/VC_VL_VIEW transaction to see if the text was changed, the text doesn't change.

Can you tell me how to use the bapi please?

Thanks in advance.

Sorry about my english 😀

Greetings