Validation when posting a document using T. Code FB50 or F-02

Dear Experts
Please let me know on how to validate when posting a Cross Company Transaction using T. Codes FB50 or F-02.  The requirement is to restrict Branches (each Branch is a Company Code in SAP) to post any Cross Company documents by selecting HO Company Code in Line Item, system has to stop the User by giving Error Message.
We can't control this using User level Authorizations because, here the Authorization is provided to the Users to post the Transactions using T. Codes FB50 and F-02.
To restrict this, I created a Validation as below:
Prerequisite:
BKPF-TCODE = 'FB50' OR BKPF-TCODE = 'F-02' AND
BKPF-BUKRS = 'Br. Company Code' AND
BSEG-BUKRS = 'HO Company Code'
Check:
FALSE
Message:
You Can't post Cross Company Transactions using T.Code FB50 or F-02
And I activated the above Validation in OB28 for HO and Branch Company Codes.  But the Validation is not working properly.  Can anybody help me on how to proceed further in this regard please.

Hi,
I haven't tried to use a transaction code for Validation purpose. Instead, I have used document type as prerequisite and then check:
BKPF-BUKRS = 'Br. Company Code' AND
BSEG-BUKRS = 'HO Company Code'
If the condition is met, it displays an error (per the message in validation) while completing the line item details on posting a document.
Please let me know if that helps. If not, I can try to replicate your scenario and let you know if there is anything missing.
Thanks,
Ashish

Similar Messages

  • Validation of a reference field when posting accounting document using FB50

    Hi all,
    We hada requirement to restrict the users from entering japanese caharaceters in the reference field of a accounting document. The validation for this was done using the transaction OB28. when the user posts the accounting document using transaction FB01 or changes the accounting document using transaction FB02, the validation provided in OB28 does work(it throws an error restricting the user from entering japanese characters if he has done so). But whenthe user pots the accounting document using the transaction FB50, the same error message comes as information message although the coding is for giving an error message.
    This however does not happen when the user logs on in English. In English logon the error mesage does appear.
    When the user logs on in Japanese the message comes as an information message but at the same time does not allow posting of the document.
    Debugging this revealed that the OSS note 197329 has been applied to the standard SAP program SAPMF05A.
    Any pointers to how this can be rectifiied would be appreciated.
    Thanks in advance.

    I think it would be best if you opened an OSS message on this.
    Rob

  • Unable to update XBLNR field on BKPF when posting a document using BAPI_ACC_GL_POSTING_POST

    Hi,
    I'm trying to post a clearing document using BAPI_ACC_GL_POSTING_POST, but after posting i'm unable to see the data in the reference field on header (BKPF-XBLNR). I'm passing the data in the header structure of the BAPI  (DOCUMENTHEADER-REF_DOC_NO).
    Thanks in advance.
    Regards,
    Sandeep

    We restricted our entry to five decimals and solved the issue.

  • Incorrect SLED when posting Material Document using BAPI_GOODSMVT_CREATE

    Hi,
    I have an upload program that performs goods movement and creates material document for a given PO using BAPI_GOODSMVT_CREATE.
    the program passes the data from input file (through the parameter GOODSMVT_ITEM) including SLED, however, once the material document is posted, the SLED is still derived from batch input master and the BAPI does not use the one passed to it via GOODSMVT_ITEM.
    The requirement is that, the SLED provided in the input file should be the SLED of the Matdoc created, and not the SLED maintained in the Batch input master.
    Please advise.
    thanks,
    NC

    sorry to say that, but you should learn about the application, you cannot make the field empty, it is SAP design that the valuation type goes to the batch field in case of split valuation active wihtout having batch managment active.
    your wish is not possible with enhancements, and if , you would create inconsistencies and bigger problems in subsecuent processes.

  • Validation on Post Parked Document via SAP Workflow (SAP Business Workplce)

    Hi,
    I have create validation rules, and I have excluded t-code type FBV0, FBV1 and FBV2 by following SAP Notes 158739 in that validation prerequisites, so when user post parked document using t-code FBV0 the validation is not carried out and it's work perfectly.
    But when user try to post parked document using SAP workflow, the validation was carried out hence, user can't post the parked document. Does anyone now how to resolve this? Appreciate your advise to solve this issue. Thanks.
    Regards,
    Bobby

    In FBV0 use document list and the try and post it
    Cheers
    Prakash

  • Posting period 011 2013 is not open while posting the document using F-02 getting the error

    Hi SAP Captains,
    Pls help me here.
    While posting the document using T-code F-02 getting the error "Posting period 011 2013 is not open.
    Please help me how to do, can you provide step by step.
    Rgds..Suresh

    Hi Suresh,
    You can search google and will get number of posts on this. This will lead to duplication of similar posts on forum.
    The message says "FI posting period is closed for 11th period of 2013". In which period you are trying to post the transaction?
    If it is past, open the FI posting periods in OB52.
    BR, Srinivas Salpala

  • Posting Intercompany documents using program RFBIBL00

    Hi,
    I want to know if we can post intercompany documents using program RFBIBL00(Direct Input Method).
    If this is possible, please let me know how can this be achieved as I am getting an error "Cross-company code postings not defined".
    Thanks
    Harveen.

    HI
    You need to setup the relationships between the company codes. Do this via
    OBYA transaction.
    Hope this help.
    Regards
    kishore

  • Unable to transfer post the document using BAPI "BAPI_GOODSMVT_CREATE"

    Hi Experts,
    I am unable to post the document using BAPI "BAPI_GOODSMVT_CREATE", getting error "_Sales order stock --- does not exist_"
    details are stated below:
    GM_CODE : 04, it is working fine for the scenario with same saleorder number and line item, but when i give same sale order number and different line item, then i am getting the above error.
    Example : Posting from Saleorder A with line item 100 to saleorder A with lineitem 100 its working fine, but when we are posting
                    from Saleorder A with lineitem 100 to saleorder A with line item 200 it is not working.
    Also When I trying to do with the transaction MB1B manually, it is working fine. kindly suggest me.
    Needed Urgently....
    Appreciate for you early response.
    Regards,
    Sathya.
    Edited by: Sathyanarayana Raghavendra on May 6, 2010 1:00 PM

    Hi,
    Hi Did you call Function BAPI_TRANSACTION_COMMIT' after calling the BAPI.    ?
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
        EXPORTING
          wait = c_x.
    Regards,
    Jovito.

  • Post the document using f-65?

    Hi Experts,
    I know the FB01 tcode  used for Posting and F-65 used for document parking, my query is there any possible to "POST"  the document using F-65?
    Thanks
    NK

    why do you want to POST with f-65 . where there is Fb01 for post But in FB01 you can Pak the docuemnt .
    Go to docuemnt menu and click on SAVE  as completed "
    Many Thanks

  • Problem in Posting a document using BAPI_ACC_DOCUMENT_POST

    Hi,,
    I am using the function module "BAPI_ACC_DOCUMENT_POST" to post a vendor Invoice (KR). i think the t-code to post this is FV60.when i post the document, the document number is getting generated but amount is missing  in t-code fbv3 but bseg table is getting updated properly. Can any one help the actual input to be given to create a document and tax
    Regards

    I have a suggestion:
    Try to post this kind of document (KR) with transaction code FB01. If you can see the document correctly with FBV3 transaction, then you can use BAPI you mention.
    The following function modules may be useful for calculating taxes:
    CALCULATE_TAX_FROM_NET_AMOUNT
    CALCULATE_TAX_FROM_GROSSAMOUNT
    Regards.
    Rafael Rojas.

  • Posting a document using FM PRELIMINARY_POSTING_FB01

    Hello Experts,
    I know we can FM PRELIMINARY_POSTING_FB01 to PARK a Document. But I think we can also use this FM to Post the Document. The reason I want to use this FM, not other BAPI's, is I have all the structures (BSEG, BKPF, BSET etc) that I needed to populate. So I passed I_XCMPL = 'X'. However, it still Parked the Document not Posted.
    Can anybody please let me know what I missed?
    Thanks a lot. Sadly this FM does not have any documentation.
    Here's my code:
    w_bkpf-bukrs = p_bukrs.
       w_bkpf-gjahr = p_gjahr.
       w_bkpf-blart = p_blart.
       w_bkpf-bldat = p_dat.
       w_bkpf-budat = p_dat.
       w_bkpf-monat = '01'.
       w_bkpf-cpudt = p_dat.
       w_bkpf-cputm = sy-uzeit.
       w_bkpf-wwert = p_dat.
       w_bkpf-usnam = sy-uname.
       w_bkpf-tcode = 'FB01'.
       w_bkpf-xblnr = 'ZTEST1'.
       w_bkpf-waers = p_waers.
       w_bkpf-glvor = 'RFBV'.
       w_bkpf-ausbk = p_bukrs.
       w_bkpf-bktxt = 'TEST'.
      append w_bkpf to t_bkpf.
      w_bseg-bukrs = p_bukrs.
      w_bseg-gjahr = '2010'.
      w_bseg-bschl = '40'.
      w_bseg-koart = 'S'.
      w_bseg-shkzg = 'S'.
      w_bseg-dmbtr = '2000.00'.
      w_bseg-wrbtr = '2000.00'.
      w_bseg-pswsl = p_waers.
      w_bseg-altkt = '0001298232'.
      w_bseg-vorgn = 'RFBU'.
      w_bseg-kokrs = 'ABC'.
      w_bseg-xkres = 'X'.
      w_bseg-hkont = '0001298232'.
      w_bseg-saknr = '0001298232'.
      w_bseg-lifnr = '0000100000'.
      w_bseg-zterm = 'CN30'.
      w_bseg-projk = '00001111'.
      append w_bseg to t_bseg.
       CALL FUNCTION 'PRELIMINARY_POSTING_FB01'
       EXPORTING
    *     TEXT_UPDATE            = ' '
    *     TEXT_ITEM_UPDATE       = ' '
    *     I_UF05A                =
          I_XCMPL                = 'X'
    *     FS006_FB01             =
          I_TCODE                = 'FB01'
    *     I_PARGB                =
    *     I_TCODE_INT            =
    *   IMPORTING
    *     XEPBBP                 =
        TABLES
          T_BKPF                 = t_bkpf
          T_BSEG                 = t_bseg
          T_BSEC                 = t_bsec
          T_BSET                 = t_bset
          T_BSEZ                 = t_bsez
    *     T_BKORM                =
    *     T_THEAD                =
    *     T_SPLTTAB              =
    *     T_SPLTWT               =
        EXCEPTIONS
         ERROR_MESSAGE           = 1.

    Hi,
    Thanks for the response. I wanted to check the FM which gets triggered in the BTE. However I could find one in FIBF.
    Can you please let me know if you have any documentation on FM PRELIMINARY_POSTING_FB01? That would help me understanding its functionality.
    Thanks a lot.
    Should I use "IN UPDATE TASK" when calling this FM? Thanks.
    Edited by: lope jie on Apr 28, 2010 8:10 PM

  • How to set print option for a Billing document using T-code VF02

    Hi All,
    Please suggest me the way to set print option for a Billing document for T-code VF02 and please let me know how to get print preview for any particular Billing document?
    regards
    Anand.

    Enter the billing documents detail
    Goto Goto> Header>Output.
    Check the status for your output type in this screen.
    If it is green then come back to the VF03 screen.Enter the billing document number.
    Click on Billing document-->Issue output to.
    Press (CtrlShiftF1) or click on the icon beside "Print options".
    Here you can see the print preview.
    If the status is red then click on the processing log.Here you will get the error messages.
    If the status is in yellow colour,then click on the "Further Data" button
    Set "Dispatch time" as "4 Send immediately (when saving the application)"
    Before the print preview option you should make sure you have added correct output type to the relevant billing document. To do that, go to transaction VF02.
    Enter the billing document no
    Go to Menu option -> Go to -> Header -> Output
    In that screen you have to add relevant output type. (Standard output type is RD00)
    Add that & press enter key
    Highlight that line & press "Further Data" button
    Set "Dispatch time" as "4 Send immediately (when saving the application)"
    Press "Back" Button
    again select that line & go to "Communication method" button
    Set "Logical destination" as LOCAL"
    Don't mark "Print immediately" & "Release after output" ticks. If you mark them, sa soon as you save the billing document, you'll get a print out.
    Press "Back" Button
    Save
    Now form the initial "Change Billing Document" screen, Go to Menu option; Billing Document -> Issue Output to
    You can see that output type line appear.
    select that line & press "Print Preview" button or (CTRLSHIFTF1)
    You can see the print preview.
    Alternatively you can use VF31 to print multiple print outs at same time.
    If you want to get PDF outputs of billing documents, go to your printer settings in the your computer from Control Panel.
    Set PDF Writer as "Default Printer" (Right click & select "Set as Default Printer")
    Then normal way, print the billing from SAP.
    It'll automatically send to your PDF writer. You can save it to the path you want,

  • Problem while Posting a Document Using BAPI_ACC_DOCUMENT_POST

    Hi All,
    When i try to post my General Ledger Document using BAPI_ACC_DOCUMENT_POST, i face a situation due to the exchange rate. The field EXCH_RATE in CURRENCYAMOUNT table accepts only 5 decimals. But according to my scenario it should accept more than 5 decimals. Is there any BAPI or other way to solve this issue.
    Thanks & Regards,
    Venkatesh. R

    We restricted our entry to five decimals and solved the issue.

  • Error Rounding Difference too high when reset cleared document using FBRA

    My Client has posted cleared document with T_Code F-51. This cleared document has cleared 6040 open items.
    And now, they want to reset and reverse that cleared document.
    We found error "Rounding difference too high" when we are reset cleared document using FBRA.
    Kindly need your advice.
    Many thanks in advance.
    Regards,

    Hello,
    Please let me know the ERROR number.
    Regards,
    Ravi

  • Is not post parked document using workflow

    Hi friends!!!!
    Weu2019re using workflow for document parked through FIPP_FRAME_1 template and task Task WS10000051 delivered by SAP
    The system does not post parked document parked that are processed via the workflow although they have been released, but, when we try posting it through the menus u201CDocuments > Complete" in the Tcode FBV0 the document parked is not post.
    When checked in the Tcode SWIA, We´re having an endless loop
    the moment we choose workflow logs option. The items keep on
    repeating on a loop giving us a long scroolbar with repeated lines.
    Thanks!!!!

    In FBV0 use document list and the try and post it
    Cheers
    Prakash

Maybe you are looking for

  • 7600GS AGP problem

    I just bought a Gainward 7600GS AGP  with mainboard  nForce2 MSI  Delta2 LSR. after that  my  monitor gets compleatly black from 2 to 2 minutes without any reason ! I  tried to reinstall windows,  install latest nVidia drivers,  nothing. It could be

  • Bitmap indexes and group by

    I'm trying to understand why Oracle 8.1.6 sometimes uses bitmap indexes sometimes not. Of course I have all the statistics, my bitmap indexes are valid and so on. The problem is this: - I have a customer table very very large - I have many columns wi

  • Battery Draining Problem.. !!

    Hey Guyz, i mhaving problem with my xperia z1 battery.....it drains very fast....last night i did a format to my phone nd on 100 % battery remaining time was 2 days nd 8 hours remaining......but after installing some apps now on 100% battery remainin

  • How to apply j2ee licensing

    Hi everyone: I met a problem about apply J2EE licensing. I install NetWeaver 2004s in AIX machine. The j2ee licensing invalid after 28 days and the j2ee will shutdown every 30 minutes. Then I need restart j2ee engine every 30 minutes. So I go to SAP

  • Preloading images to browser's cache

    Hi, I'm working on a flash gallery project where images are loaded through xml file.I have some buttons in the gallery for different categories of images to be shown. Is there a way to preload images to browser's cache prior to them being called.?,I'