cancel
Showing results for 
Search instead for 
Did you mean: 

SRM PO update internal note and supplier note

Former Member
0 Kudos
271

HI All

Can you pl assist on how i could update SRM PO text via Function module as I need to batch update a couple of POs

This includes Note to Supplier and internal note field

I tried with FM BBP_PDLTX_UPDATE as per the input value you see below it seems to execute successfully but does not update the PO

Regards

Vinita

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

I used BBP_PROCDOC_UPDATE to update the header text \

Most of the other FM in SRM seem to be not working ..

Adding this as the answer

Answers (1)

Answers (1)

laurent_burtaire
Active Contributor
0 Kudos

Hello Vinita,

i guess there is a missing COMMIT WORK.

Regards.

Laurent.

Former Member
0 Kudos

Hey Laurent

Glad you replied I was not able to tag you thanks so much for your help

Here is the code which I used and it has a commit but seems like this FM does not work?

Can you try from your end and see if it works for you

or if you could confirm issues in my code?

            lv_text = 'This is a test text'.
            DATA : lt_ltxt TYPE STANDARD TABLE OF bbp_pds_longtext,
                   lv_temp TYPE string.
            FIELD-SYMBOLS <fs_ltxt> TYPE  bbp_pds_longtext  .
            CALL FUNCTION 'BBP_PDLTX_GETDETAIL'
              EXPORTING
                i_p_guid = p_guid
*               IV_KIND  =
*               IV_VERSION_TYPE       =
              TABLES
                e_ltxt   = lt_ltxt.

            DATA: lv_true TYPE xfeld.
            lv_true = abap_true.
            READ TABLE lt_ltxt ASSIGNING  <fs_ltxt> WITH  KEY tdid = 'NOTE'.
            IF sy-subrc EQ 0 AND  <fs_ltxt>-tdline IS NOT INITIAL.
              CONCATENATE lv_text <fs_ltxt>-tdline INTO <fs_ltxt>-tdline  SEPARATED BY '#'.
            ENDIF.
            CALL FUNCTION 'BBP_PDLTX_UPDATE'
              EXPORTING
                i_p_guid  = p_guid
              TABLES
                i_ltxt    = lt_ltxt
              CHANGING
                e_changed = lv_true.

            WAIT UP TO 5 SECONDS.

            CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
* EXPORTING
*   WAIT          =
* IMPORTING
*   RETURN        =
              .

Regards

Vinita