Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 3510

Re: bkpf table updating wf-batch user for background task issue

$
0
0

Hi Paul,

 

I trigger workflow from z report where i collect wf initiator which is available in method.

 

Option 1.

yes update method have agent paramter = uname.

 

in post method before CALL TRANSACTION 'FBV0' USING lt_bdcdata i have change the username

sy-uname = uname but once i execute FBV0 no change in bkpf user name field.

 

option 2.

i tried below code to change usname field in bkpf but it saying "change not allowed contact SAP".

 

 

DATA: lt_accchg TYPE STANDARD TABLE OF accchg,

          ls_accchg TYPE accchg.

 

 

       

         ls_accchg = 'USNAM'.

         ls_accchg-oldval = 'WF-BATCH'.

         ls_accchg-newval = uname.

         APPEND ls_accchg TO lt_accchg.

 

 

 

    CALL FUNCTION 'FI_DOCUMENT_CHANGE'

      EXPORTING

        i_awtyp        = 'BKPF'

        i_awref        = lw_vbkpf-xblnr

        i_bukrs        = l_bukrs

        i_belnr        = l_belnr

        i_gjahr        = l_gjahr

      TABLES

        t_accchg       = lt_accchg

      EXCEPTIONS

        no_reference   = 1

        no_document    = 2

        many_documents = 3

        OTHERS         = 4.

 

Thanks,

Idris.


Viewing all articles
Browse latest Browse all 3510

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>