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: 

Function Module to update text fields in VF02

Former Member
0 Kudos

Hi All,

Could anyone please tell me the function module to update transaction VF02(Billing).

My requirement was to create invoice for single/multiple deliveries. With the help of BAPI_BILLINGDOC_CREATEMULTIPLE i have created the invoice, but i need to update two fileds(EIKP-text1 and EIKP-text2) with other invoice number and BL number which is coming from a ztable.

I have to update it in the below fields.

vf02-->header doc details-->fortrade/customs-->comments. first two fields of this comments section.

4 REPLIES 4

former_member1716
Active Contributor
0 Kudos

Hi Arun,

Please try with the text function modules, Please let us know in case you are facing any issues with the inputs to the FM.

CREATE_TEXT,UPDATE_TEXT

Regards,

Satish

0 Kudos

Hi Satish,

Thanks for the suggestion.

Is this the long text which will display when you click on header texts. Actually i have to update it in two fields. the path to check those two fields is given above.

Please note that my requirement is not to update the header texts with some long text.

I have to put the Bill of lading number and vendor invoice number in two fields of vf03.(In EIKP-text1 and EIKP-text2).

If we can use this FM please let me know the parameters also.

Am passing it like below and getting subrc 1.

*Read the success table

    READ TABLE gt_success INTO gs_success INDEX 1.

* Concatenating client & invoice number

CONCATENATE  sy-mandt

gs_success-bill_doc

INTO  lv_fname.

* Moving Values to FM fields

    lv_fid1          = 'VBRK'.

* Filling text2

*  lv_fid2           = 'AUFK'.

   lv_flanguage     = sy-langu.

   lv_fname       = lv_fname.

   lv_fobject     = 'AUFK'.

* moving the billing number to text

gs_flines-tdline  = gs_billing-ouk_invoice_no.

* Append the line

    APPEND gs_flines TO gt_flines.

* Clear

    CLEAR: gs_flines.

* Call FM to update the text in invoice

    CALL FUNCTION 'CREATE_TEXT'

      EXPORTING

        fid                        = lv_fid1

        flanguage             = lv_flanguage

        fname                  = lv_fname

        fobject                 = lv_fobject

        save_direct          = 'X'

*     FFORMAT           = '*'

      TABLES

        flines            = gt_flines

     EXCEPTIONS

       no_init           = 1

       no_save           = 2

       OTHERS            = 3

              .

    IF sy-subrc = 0.

    ENDIF.

shadab_maldar
Active Participant
0 Kudos

Hi Arun,

Please check with this BAPI BAPI_CUSTOMERSETTLE_CHANGEMULT.

0 Kudos

Hi Arun,

If you are providing the foreign trade data in the billing document, you can update the comments using FM 'EXPIMP_POSTING' providing the foreign trade no. 'EXNUM' and the data which you want to update in

TEXT1

TEXT2 &

TEXT3 fields.

Please see if this can be useful!!

Reward if useful!!!

Thanks!!