Payment block to set in background

Hi all,
I need to set the payment block (BSEG-ZLSPR) in a background task of a custom workflow, so I developed a custom method in BUS2081. It works when I run it via SWO1, but not through the background task.
I know it could be a problem of COMMIT WORK and I've added it (or BAPI_TRANSACTION_COMMIT), but it doesn't work anyway.
Can you help me please?
Thanks.
Kind regards,
Angelo

Hi Rob,
sorry, but it doesn't work. Even if the actual agent is a dialog user, SM50 shows WF-BATCH as the user and doesn't let me enter the debug mode via menu Program -> Debugging.
The code to change (to 'G') the payment block is based on the following custom function module, copy of PR_WF_PAYMENT_BLOCK_RESET, but it gets in input the new code:
CALL FUNCTION 'ZPR_WF_PAYMENT_BLOCK_RESET'
  EXPORTING
    belnr              = t_bseg-belnr
    bukrs              = t_bseg-bukrs
    gjahr              = t_bseg-gjahr
    buzei              = t_bseg-buzei
  USERN              = ' '
    i_zlspr            = 'G'
EXCEPTIONS
  FOREIGN_LOCK       = 1
  BSEG_LOCK          = 2
  BKPF_READ          = 3
  BSEG_UPDATE        = 4
  BSIK_UPDATE        = 5
  BSIK_OPEN_FI       = 6
  BSID_UPDATE        = 7
  BSID_OPEN_FI       = 8
  OTHERS             = 9
Thanks.
Angelo

Similar Messages

  • Payment Block Status automatically set 'Y' in FBV2

    Hi Team,
                 My requirement is this,   when user want to post document by T Code  FBv2 or MIR4 
                 if user stands on 25 to month end date. means  system date check then
    Payment block automatically set to 'Y' (month end posting).
    for this one i used many BADI and FM but not working as of now.
    one BADI i used as FAGL_SET_DOC   in debugg mode its updating the that fields value
    as its technicsl field name is  ZLSPR  whic i set  to 'Y'
    its working fine in debugg mode , but when we again check for that Document no then that filed's value is not populating as required.
    So please suggest me how can i set Payment block status to 'Y' as month end posting.
    Thanks
    Vivek

    hi Hiriyapapa,
                       I used BADI    FAGL_SET_BADI for our field update
    method is CHANGE_SEGMENT_PSEGMENT
    there i put code as below
    TYPES:  BEGIN OF TY_EKPO,
               EBELN TYPE EBELN,
               EBELP TYPE EBELP,
               PSTYP TYPE PSTYP,
               END   OF TY_EKPO.
       DATA : IT_EKPO TYPE TABLE OF TY_EKPO,
              WA_EKPO TYPE          TY_EKPO.
       DATA: WA_ACCIT TYPE ACCIT,
             L_TABIX  TYPE SY-TABIX.
       IF SY-TCODE = 'MIR4' OR SY-TCODE = 'FBV2'." OR sy-tcode = 'ZTR_SEG_RECLASS_REV' .  "Tcode for Netting Counter wise and Segment Reclassification
         BREAK 51393182.
         SELECT EBELN
                EBELP
                PSTYP
                FROM EKPO INTO TABLE IT_EKPO
                FOR ALL ENTRIES IN CT_ACCIT
                WHERE EBELN EQ CT_ACCIT-EBELN
                AND   EBELP EQ CT_ACCIT-EBELP.
         IF SY-SUBRC = 0.
           LOOP AT IT_EKPO INTO WA_EKPO .
    *          <--Begin of Change by Ashutosh Mishra     27-june-14 HRDK950590
             IF WA_EKPO-PSTYP = '9'.    ."BREAK 51393182.
               LOOP AT CT_ACCIT INTO WA_ACCIT.
    *         if WA_ACCIT-EBELN is NOT INITIAL.
                 IF SY-DATUM+6(2) EQ '25' OR  SY-DATUM+6(2) EQ '26' OR  SY-DATUM+6(2) EQ '27'
                 OR SY-DATUM+6(2) EQ '28' OR SY-DATUM+6(2) EQ '29' OR SY-DATUM+6(2) EQ '30'
                 OR SY-DATUM+6(2) EQ '31'.
                   WA_ACCIT-ZLSPR = 'Y'.      "SET Y PAYMENT BLOCK STATUS
                   MODIFY CT_ACCIT FROM WA_ACCIT TRANSPORTING ZLSPR.
                   CLEAR : WA_ACCIT.
                 ENDIF."endif.
               ENDLOOP.
             ENDIF.
           ENDLOOP.
         ENDIF.
       ENDIF.
    ENDMETHOD.
    in debug mode its working fine its updating as i want , but when we out of debug its not updating that fields status.
    I request to you please suggest me for this issue.
    Regard
    Vivek

  • Vendor Invoice paid - even though Payment Block set to "A"

    Hello,
    I have encountered the following situation:
    Late Nov 2010 - invoice created for a vendor
    Early Dec 2010 - payment block on line items in accounting document set to "A" in t-code FB02
    Late Dec 2010 - payment was made to the vendor, even though payment block of "A" set on the document
    How can payment to a vendor be made on this document if the payment block is set to "A"?  Can this be over-ridden manually by the user?  Any help would be greatly appreciated.

    Hi,
    Go to transaction OB27 and restrict for manual payment and change of payment block in payment run.
    Regards,
    Gaurav

  • How to populate the payment block through the BAPI_INCOMINGINVOICE_CREATE

    Hi,
    I am trying to create the incoming invoice through the BAPI (BAPI_INCOMINGINVOICE_CREATE) .
    In MIRO transaction when i create the Invoice without any tax , the <b>payment block shows free for payement</b> . How to give create the invoice with the following condition through the BAPI (BAPI_INCOMINGINVOICE_CREATE) .  when there is Tax : The payment block = 'R' (Invoice verification) .
    No Tax                : The payment block = ' ' (Free for Payment).

    But everytime the invoice is created the Payment block is set to 'R' even if the Tax is not given.
    Following i am populating
    <b>Header Structure:</b>
    <b>Test                   Value Description                      PI Header Data Fields</b>
    ‘X’                Invoice Indicator     HEADERDATA-INVOICE_IND
    SPACE                Document Type     HEADERDATA-DOC_TYPE
    05-11-2006           Document Date     HEADERDATA-DOC_DATE
    17-11-2006           Posting Date                     HEADERDATA-PSTNG_DATE
    123456-B1                Ref Document Number     HEADERDATA-REF_DOC_NO
    9001               Company Code     HEADERDATA-COMP_CODE
    7006924               Vendor Number     HEADERDATA-DIFF_INV
    BRL               Currency                     HEADERDATA-CURRENCY
    BRL               Currency                     HEADERDATA-CURRENCY_ISO
    10000               Gross Amount      HEADERDATA-GROSS_AMOUNT
    05-11-2006          Baseline ate                     HEADERDATA-BLINE_DATE
    DD               Header Text                     HEADERDATA-HEADER_TXT
    0001               Payment Terms     HEADERDATA-PMNTTRS
    123456-B1               Ref Document Number     HEADERDATA-REF_DOC_NO
    Z1               NF Type                       HEADERDATA-J_1BNFTYPE
    space               Payment Block Key      HEADERDATA-PMNT_BLOCK
    <b>For Item Structure:</b>
    <b>Test Data     Description            BAPI Item Data Fields</b>
    000001                     Invoice Item           ITEMDATA-INVOICE_DOC_ITEM
    4500021387     Purchase Order Number   ITEMDATA-PO_NUMBER
    0010                     Purchase Order Item           ITEMDATA-PO_ITEM
    Z1                     Tax Code                           ITEMDATA-TAX_CODE
    SP 50308                     Tax Jurisdiction Code           ITEMDATA-TAXJURCODE
    10000                      Item Amount           ITEMDATA-ITEM_AMOUNT
    200                      Item Quantity           ITEMDATA-QUANTITY
    EA                      Purchase Order Unit           ITEMDATA-PO_UNIT
    Can u please tell me what is the mistake or any other ways of populating the Payment block.
    Always the payment block is 'R' in MIR4 transaction even if i give space in the BAPI

  • How to stop clearing open items with manual payment block.

    Dear,
    Even though we have set "manual payment block" on payment block indicator in OB27,
    I can process to clear open items manually in F-44 though.
    Actually user wants to NOT allow to clear once payment block's set in an open items.
    SAP documentation says,
    "Indicator that documents which are flagged with the relevant blocking key cannot also be cleared during manual entry of incoming payments or outgoing payments.".
    Can you advise me why this configuration does not work ?
    Kind regards,
    Desperate FI con.

    Include - MF05BFO0
    FORM op_pruefen
    Context:
              WHEN 'K'.
               ENHANCEMENT-POINT mf05bfo0_02 SPOTS es_sapmf05b.
    Create an enhancement here and add this code
                   IF SY-TCODE = 'FB1K'.
                         T041A-AUGLV = 'AUSGZAHL'.
                   ENDIF.

  • To set payment block to 'A' in F-59 transaction on the original document.

    When I run the transaction f-59 for a document, my requirement is that I should set the payment block to 'A' for the original document.
    I tried using the BTE - sample_process_00001120, but it doesn't seem to update the value for the original document or the current document that gets posted.
    Kindly suggest how i can handle this.
    Thanks in advance.

    Hi,
    Try the following BTE's for changing the Payment Block for the current document. Change the value T_BSEG-ZLSPR.
    00001020     POST DOCUMENT:       Prior to final checks
    00001025     POST DOCUMENT:       Final checks completed
    00001030     POST DOCUMENT:       Posting of standard data
    00001050     POST DOCUMENT:       Accounting interface
    Think that for updating the payment block in Original Document, we should try with some FI document change BAPI.
    Regards,
    Harish

  • Set Payment block for documents generated by txn FBCJ

    Is there a way to block the FI documents (receipts) from FBCJ?
    I mean, when we create a cash receipts (repayment froma a vendor).
    I set the payment condition in the vendor master data in order to block all the invoices generated but for the cash journal txn doesn't work.
    Is it possible to add the field Payment Condition (ZTERM) or Payment Block Status (ZLSPR) directly in FBCJ??
    Any idea??
    thx in advance.

    Dear Pham,
    I don't have any idea about down payment process, so straightly I can't answer your requirement
    Please go through this SAP help link it may help you about down payment process.
    http://help.sap.com/saphelp_47x200/helpdata/en/dd/561621545a11d1a7020000e829fd11/frameset.htm
    I hope this will help you,
    Regards,
    Murali.

  • BAPI for set payment block in FV60

    Hi,
    I need to set the payment block for the documents created by the transaction FV60.
    'BAPI_INCOMMINGINVOICE_PARK' post a park document but it does not change the payment block.
    Do you know which BAPI can set this payment block?
    Thanks,
    moorthy

    Thanks,
    Yes, you are right. But you can crete a document in FV60 which does not posted in bseg. that means the document is parked. In this case the FI..... function module cannot be used as it reads BSEG. That I have tried.
    Do you know how to change the payment block of a parked document?
    Thanks for your help,
    moorthy

  • Massive setting of  A/P payment block

    Hi all,
    I have to set the payment block for a lot of A/P documents. Do you know if there exist a way to do a massive document update?
    Thanks.
    Flavio

    Hello,
    Go to FBL1N,
    Select the document you would like to mass change.
    click on mass change button.
    Enter the Payment Block.
    Say OK.
    Payment block will be set to the line items.
    Regards,
    Ravi

  • Setting Payment Block

    Hi Experts,
    I want to set Payment Block. So is there any standard transaction code or function module or any other method availabe using which I can set Payment Block.
    Please help me out on this,
    Regards,
    Ravi

    Hi Akash,
    Thanks for ur reply.
    Your answer was helpful to me.
    Actually I am a technical person and do not have more functional knowledge.
    I have modified the standard Payment Proposal program F110 to ZF110 and I have provided checkbox at the line item level.
    So Is there any function module available using which I can set Payment Block for selected Items or any other suitable method which you can suggest.
    Please let me know if u find any solution.
    Thanks and Regards,
    Ravi

  • Payment release required; payment block set automatically Message no. F5707

    Hello Friends,
    I am trying to post vendor down payment with T.CODE F-48 but is am getting this Error " Payment release required; payment block set automatically, Message no. F5707"
    Will any budy please make me clear with this issue ....
    Have a nice day...
    Regards
    Amresh...

    HI g.amresh,
    Please check with the Payment Requiest F-47.  Are you using this function then check Receipt box in F-48.  I think that would be the reason. 
    Regards

  • How to set Payment Block for Service PO when IR before GR?

    Hi,
    Could anyone advice me on how to set payment block especially for service Purchase order, item category D, when IR before GR (SES)?
    Thanks,
    Alex Kwon

    Hi
    Please try this...
    in IMG>MM>Invoice Verification>Invoice Block>Item amount check
    Here you can activate the item amount check for Item categories as well as GR item.
    Pls explore I have not tested.
    Hope it helps
    Karthik

  • Payment block set for Down payment requests processed via F110

    When I process a vendor down payment request from F-47, it gets paid during F110. However it gets posted to Vendor a/c with special GL indicator and with a "payment block". I am not sure why the payment block is put automatically. Can this be functionality be changed.

    Hello Krishna,
    Can u pls elaborate the question.
    Step1: Post down payment request F-47
    Step2: Post down payment against request F110
    When your getting this payment block.
    however pls go through this path
    IMG/FA/ARAP/Business transactions/Outgoing payments/Outgoing Payments Global Settings/Payment Block Reasons/Define Payment Block Reasons or Define Default Values for Payment Block
    Regards
    Murali

  • Payment block issue

    Hello
    a particular miro invoice is blocked for payment 'R' we can see the document no. which is showing blocked for payment. but payment is proceeded through FB05, and payment document is generated.
    What could be the reason??
    Subodh

    Hi,
    Did you check the settings in OB27?
    You can see three options. Followings are the functionality:
    1. Change in Payment Proposal Permitted?
    It ndicates whether a change is allowed in the payment proposal. If you do not set this indicator, its block reason can be neither set nor deleted when a payment proposal is processed.
    For Example
    You can prohibit the block indicator that is set in invoice verification from being changed in the payment proposal.
    2. Blocked for manual payments
    It indicates that documents which are flagged with the relevant blocking key cannot also be cleared during manual entry of incoming payments or outgoing payments
    3. Payment block, not changeable
    Payment block that cannot be modified, that is, within a dialog transaction (for example, Document Change), the user cannot reset the payment block.
    In this case, a blocked item must be released for payment within the workflow. After the payment release, the payment block is automatically reset in the background. You can only use one payment block for the payment release workflow, that is only one entry can be designated as not modifiable.
    I hope you found some clues.
    Regards,
    Jigar

  • How to set a background image to fill the entire screen on any device in a spark mobile application

    Hi,
    I started developing a mobile application with Flex.
    I'm trying to set a background image to fill the whole screen. I've been stucked at this point for days now. I tried everything and no solution seems to work for me.
    I'm using a TabbedViewNavigatorApplication and i need to set some background images on views.
    I need my image to fill the entire screen on any device. i don't need to mantain image aspect ratio,  just need it to be fullscreen. This seemed to work when setting a custom skin on the TabbedViewNavigatorApplication, however this blocked all my views for some reason and all components contained in view became invisible.
    Can you please tell me how can i achieve this?
    Kind regards,
    Dan

    Basically you need a larger image which can accommodate any device. The trick is to show only what each device can display, so therefore some clipping will occur based on device. Have something centered and towards margins have a  gradient or just plane colors that way the stuff in the middle will be visible on every device while nobody will care if you are clipping from the color fill.
    C

Maybe you are looking for

  • Why are my smart playlists not updating?

    I tried to create a new smart playlist, and could not get even the simplest one to populate with any music.  I then noticed that my current smart playlists are not updating.  For example, I have an UNRATED smart playlist (Rating is less than *), and

  • Sync cant be done because of failed connection to the server

    Hello! I surf Internet via proxy (in my corporate network). This proxy need password protected auth. I provided my pass to Firefox and now can surf Internet well, but when I am trying to sync my data (with embedded sync tool) there appears error "syn

  • Duplicate messages and problems receiving group text

    My moto x periodically sends out duplicate text.  I also cant receive replies to group messages.  I have deleted all old threads and cleared cache.  I have uninstalled the  Verzion messenger app and reinstalled.  Not sure what else to try!  Unfortuna

  • Loading JDBC driver

    Q: Which of the following ways will not load a JDBC Driver? A.Configure the list of drivers in jdbc.driver system property B.call the Driver's constructor C.pass class name to forName method of the class D.use JNDI to locate the Driver

  • HT4847 i want to keep and continue the amount of iCloud storage that I currently have

    i want to keep and continue the amount of iCloud storage that I currently have.  How do I extend my current iCloud service beyond the expiration date?