Validate Header Text (MKPF-BKTXT) in Migo

Hi experts, I'm new in SAP OO.
I need to validate the header text in Migo. We put in this field the number of invoice of goods receipt. Users sometimes make mistakes and re-enter the same invoice number, making problems in the stock. I need don't duplicate the register of this invoice.
I tried to implement BADI MB_DOCUMENT_BADI Method MB_DOCUMENT_BEFORE_UPDATE but I don't know how to do it.
Or exist other way to do it?
Please give me, if possible, some example.
Thanks in advance.
Hugo

For BADI Implementation, you use SE19 to create new implementation using classic BADI.  You enter MB_DOCUMENT_BADI  in BADI name and click create implementation.  Then you enter your own implementation.  Then you can double click on the method and enter your code there.  Note that you will need to activate the implementation before able to use it.

Similar Messages

  • Fill Doc Header Text in VL01N

    Hi,
    I made the delivery with transaction VL01N and of course it is generate a Material Document (mov type 601). if i try to change the material document i can change the field Doc Header text (mkpf-bktxt). So  my question is can i fill this field when i am making the Delivery in transaction VL01N?
    Thank you for your interest in my question
                     Best Regards
                                   João Fernandes

    Hi Joas,
    From your theard i could understand that you create a Delivery Note.
    Delivery consists of three parts like
    Picking, Packing and PGI( Post Goods Issue).
    If you do picking and Packing the then save the delivery and delivery Number get Generated,But it doesnt mean Complete Delivery unless you Do the PGI.Once you Do the PGI Only the Material Document will get Generated.Yes while creation of Delivery you can maintian the text you required.
    Hope this clarifies your doubt and Please Reward If Really Helpful,
    Thanks and Regards,
    Sateesh.Kandual

  • Transfer document header text from billing document to FI document

    Dear all,
    Where do I specify that the document header text out of the billing document should be transferred to the corresponding FI document?
    Currently, the FI document header text (BKPF-BKTXT) remeans blank after transfer from billing document. We need this field to be filled in, but I haven't found how to have this filled in.
    In copy control from sales doc to billing doc, there is the possibility to transfer the Reference number & Assignment, but nothing about document header texts.
    Some say that it would only be possible via coding, but anybody has any idea if it might be possible via standard SAP?
    Many thanks!
    Best regards

    Hi,
    We also had a bit same requirement, which is to copy the billing header text to FI item text (BSEG-SGTXT). The solution we took is to use FI Substitution (t-code GGB1), so that every time a FI document created from SD... the substitution reads the billing header text and put it in the FI item text. I think the same method could be used for FI header text (BKPF-BKTXT). Below is the solution for your reference.
    Prerequisite:
    Document Type = 'RV' AND Reference <> '' AND
    ( Transaction code = 'VF01' OR Transaction code = 'VF02' OR
    Transaction code = 'VF03' )
    Substitution:
    Using exit which coding is as below.
    *&      Form  u900
          Copy Billing Header Text to SGTXT
         -->P_SGTXT    FI Item Text
    FORM u900 USING p_sgtxt TYPE bseg-sgtxt.
      DATA: lv_name TYPE thead-tdname,
            lt_line TYPE STANDARD TABLE OF tline,
            lw_line TYPE tline.
      lv_name = bkpf-xblnr.
      CALL FUNCTION 'READ_TEXT'
        EXPORTING
          id                      = 'Z001'
          language                = sy-langu
          name                    = lv_name
          object                  = 'VBBK'
        TABLES
          lines                   = lt_line[]
        EXCEPTIONS
          id                      = 1
          language                = 2
          name                    = 3
          not_found               = 4
          object                  = 5
          reference_check         = 6
          wrong_access_to_archive = 7
          OTHERS                  = 8.
      IF sy-subrc EQ 0.
        READ TABLE lt_line
          INTO lw_line
          INDEX 1.
      In Billing Header Text, the sign '&' (ampersand) is automatically
      added some characters so it becomes '<(>&<)>'.
      The logic below is to fix that issue.
        REPLACE ALL OCCURRENCES OF '<(>' IN lw_line-tdline WITH space.
        REPLACE ALL OCCURRENCES OF '<)>' IN lw_line-tdline WITH space.
        p_sgtxt = lw_line-tdline.
      ENDIF.
    ENDFORM.
    Regards,
    Teddy Kurniawan

  • FI document Header text formation using tcode F110 (Automatic payment )

    After completion of tcode F110 i.e. completion of a cycle of automatic payment transaction
    Then we can see header text of created FI document number by using tcode fb03.
    But the header text created through F110 has a concatenation of Run Date and Identification.
    There is problem that how it can happen?
    I have gone through all program code; there is no such direct coding for concatenation of header text, rather concatenate happens at different level of coding.
    We can create FI document using FB01 also and there is choice to enter Header text manually as well as we can select it using F4 help.
    Any one has any IDEA regarding this?
    Thanks,
    Suyog

    Hi
    I'm not sure it's helpful answer. The code below shows the way to change FI document header text (BKPF-BKTXT).
    tables: bkdf, bkpf, bsec, bsed, bseg, bset.
    constants:  c_bukrs type bkpf-bukrs value '11',
                c_belnr type bkpf-belnr value '1900000001',
                c_gjahr type bkpf-gjahr value '2011'.
    data: t_bkdf  type standard table of bkdf with header line,
          t_bkpf  type standard table of bkpf with header line,
          t_bsec  type standard table of bsec with header line,
          t_bsed  type standard table of bsed with header line,
          t_bseg  type standard table of bseg with header line,
          t_bset  type standard table of bset with header line.
    start-of-selection.
    * BKDF
      select *
        from bkdf
        into table t_bkdf
        where bukrs eq c_bukrs and
              belnr eq c_belnr and
              gjahr eq c_gjahr.
    * BKPF
      select *
        from bkpf
        into table t_bkpf
        where bukrs eq c_bukrs and
              belnr eq c_belnr and
              gjahr eq c_gjahr.
      loop at t_bkpf.
        concatenate t_bkpf-bktxt '-R'
        into t_bkpf-bktxt.
        modify t_bkpf.
      endloop.
    * BSEC
      select *
        from bsec
        into table t_bsec
        where bukrs eq c_bukrs and
              belnr eq c_belnr and
              gjahr eq c_gjahr.
    * BSED
      select *
        from bsed
        into table t_bsed
        where bukrs eq c_bukrs and
              belnr eq c_belnr and
              gjahr eq c_gjahr.
    * BSEG
      select *
        from bseg
        into table t_bseg
        where bukrs eq c_bukrs and
              belnr eq c_belnr and
              gjahr eq c_gjahr.
    * BSET
      select *
        from bset
        into table t_bset
        where bukrs eq c_bukrs and
              belnr eq c_belnr and
              gjahr eq c_gjahr.
    end-of-selection.
      call function 'CHANGE_DOCUMENT'
        tables
          t_bkdf           = t_bkdf
          t_bkpf           = t_bkpf
          t_bsec           = t_bsec
          t_bsed           = t_bsed
          t_bseg           = t_bseg
          t_bset           = t_bset
    *   T_BSEG_ADD       =
    hope it's help.
    Peerasit

  • FB02 does not allow to change Document Header Text

    Hi,
    We are upgrading to ECC 6.00. In T Code FB02 we are not able to change the document header text (BKPF-BKTXT). This feild is grayed out.
    We have done the necessary configuration in Document Change Rules, Document Header- allowing BKPF-BKTXT for change.
    We can see the entry in Table V_TBAER. Please help me to solve this problem. We need to have this feild available for change.
    Regards
    Santosh Hegde

    hi Santosh,
    I understand that you can see the entry (BKPFT-BKTXT) in V_TBAER, but there are two small things to consider: if you doubleclick the line (in V_TBAER), there are two checkboxes, where the first one has to be ticked (field is changable), if the second checkbox is ticked as well, it means the field can be changed if the posting period is open. pls. check just in case...
    if it does not help, I would suggest to open an OSS call about this problem (I did search on my own, but no luck), could be some special SAP error.
    ec

  • Change Accounting Document header text

    I want to change the Accounting document header text (BKPF-BKTXT).
    I dont want to use Call transaction for this.
    Please tell me if there is any function module or BAPI available?

    >
    lavanya koduganti wrote:
    > I want to change the Accounting document header text (BKPF-BKTXT).
    Do you want to change the A/c'ing doc. header text for an existing doc? I think that CALL TRANSACTION would be easier. Why do you think otherwise?
    Any specific reason for this?
    BR,
    Suhas

  • BAPI_ACC_DOCUMENT_POST problem in header text(bktxt)

    Hi experts,
               Am using bapi  BAPI_ACC_DOCUMENT_POST for gl upload for t-code f-02. the problem is header text(bktxt) is not uploading in fb03. how to solve this problem??
    Regards,
    Sunita.

    Because BAPI: BAPI_ACC_DOCUMENT_POST will Check BADI with Posting
    1.BADI Information:
    (1)Object Type Name(Interface) is IF_EX_AC_DOCUMENT (T-code: SE24)
    (2)Method: CHANGE_INITIAL & CHANGE_AFTER_CHECK
    2.Reason:
    (1)Once This BADI has been created for any reason,
        BAPI:BAPI_ACC_DOCUMENT_CHECK & BAPI_ACC_DOCUMENT_POST
        will check it for Document Header Text
    (2)If Method: CHANGE_INITIAL & CHANGE_AFTER_CHECK has been created for any reason,
        but Creator return an null Document Header Text, then BAPI will clear Document Header Text
    3.Solution:
    (1)Add source code into Method: CHANGE_INITIAL & CHANGE_AFTER_CHECK,
        please refer to (2) for detail source code below
    (2)
      DATA: wa_header TYPE acchd.
      IF sy-xprog EQ 'SAPLBPFC'.
    *---<SAPLBPFC> is for Posting     with BAPI: BAPI_ACC_DOCUMENT_CHECK
    *---<SAPMSSY1> is for Test(Check) with BAPI: BAPI_ACC_DOCUMENT_POST
        CLEAR wa_header.
        wa_header = im_document-header.
        ex_document-header-bktxt = wa_header-bktxt.
        CLEAR wa_header.
      ENDIF.

  • MIGO header text

    Hi all,
    is there any user-exit or BADI to default the header text(not item text) in MIGO to PO header text.
    Thanks
    regards,
    sap fan.

    you try using the field exit for this.
    Execute the program RSMODPRF and create the field exit and make sure assign it to the appropraite screen.
    In the coding part just give output = '<HEADER TEXT>'.
    Reward if it is useful.
    Thanks,
    Srinivasa Rada

  • Doc. Header Text (BKTXT) in MB1C

    Hello Experts,
    Requirement is to copy 501 mvt type into a new mvt type & for the new one, the field Doc. Header Text (BKTXT) should be made mandatory in MB1C t-code.
    1)Whether any configuration available to achieve the same?
    2)If it can be done through some enhancements, then whats the BADI/BAPI/Field Exit/User Exit available?
    Please suggest.
    Regards
    Mahesh

    Hi Mahesh,
    There is an enhancement point in form OK-CODE_PRUEFEN in MM07MF00 which could be used.
    ENHANCEMENT-POINT OK-CODE_PRUEFEN_01 SPOTS ES_SAPMM07M.
    If you put your check in here you should be able to get the desired result.
    For future use, if you debug from the point where you want the check to occur you can normally find the enhancement points, or, identify where you can create an enhancement using an implicit enhancement point.
    Regards,
    John

  • BKPF-BKTXT (Doc header text source) for RV doc

    Does anyone know if the doc header text for RV doc can be maintained anywhere in the source SD doc, so that it can be transfered to the RV accounting doc?
    Thanks

    Does anyone know if the doc header text for RV doc can be maintained anywhere in the source SD doc, so that it can be transfered to the RV accounting doc?
    Thanks

  • How to validate long text in me31k( contract creation)

    Hi,
       I want to validate the long text in creation of contract(T_code - ME31k). In creation it self i want to get the long text for validation. How to get the long text value. For eg. "Release order text'  i am giving the value as '10'. While saving the document in ME31k i need to get the long text. Please do the needful.
    Thanks
    Jag
    Moderator Messag: Do not expect the forums to do your work for you.
    Edited by: kishan P on Jan 19, 2011 4:33 PM

    Use Read_text function module.
    you need to pass
    ID
    LANGUAGE
    NAME
    OBJECT   to the function moduel
    To find the Text id name language and object these are the following steps. Example: FB02
    1. goto FB02, Enter Document number
    2. from menuselect Goto>Header-->header Text..... New window will be displayed 
    3. select the Header Text. here you can see all the text. 
    4. click on the TEXT (which you want to know the Text id) , then press log ICON (you can find in bottom right of the text window) it looks like a rolled paper. 
    5. in the Next window you will find Text Name. Text ID, Language. etc...
    Regards,
    Lalit Mohan Gupta.

  • How to populate the Ser Entry ext key into the Doc Head text in ML81N Txn??

    Hello all,
    My requirement is to to populate the Service Entry external key into the Document Header text.
    ( ServiceEntry - ERS Invoice (MRRL) ). through ML81N Transaction.I have checked for exits in ML81N as well as MIRO. those doesn't seem very convincing.
    IF i see the field of Document header text where i need to populate the data it is
    ( BKPF-BKTXT ) how do i populate the data ( SE external field ) which is in ESSR table..?
    if any one has some piece of code please send it across.
    this is urgent pls help...........
    Any pointers for this would be highly appreciated.
    Thanks,
    Sreekanth...

    Please close this thread.Open new thread in forum [SAP Community Network Forums » ABAP Development » ABAP, General |;

  • Populate document header text in SES by bapi BAPI_ENTRYSHEET_CREATE

    Hi,
    I am using BAPI BAPI_ENTRYSHEET_CREATE to create a service entry sheet. But I am not able to populate the document header text (bktxt) in acceptance tab in service entry sheet header in ML81N.
    Can anybody help me what I need to pass to this BAPI in order to populate this field.
    Thanks,
    Mainak

    Hey Mainak,
    I am aware that the question was posted by you long back, but I am replying so that other readers probably can benefit from the answer below -
    I faced the similar issue recently in one of the projects. The solution that i have opted is as below -
    1. I leveraged the changing parameter 'ESSR' work area of the user exit 'EXIT_SAPLMLSR_010'. This user exit is internally called via BAPI_ENTRYSHEET_CREATE.
    2. You can export the value of 'ESSR-BKTXT' field to memory ID from the calling program and import it within this user exit and pass it to changing parameter ESSR.
    Hope this helps to other readers!
    - Thanks,
    Urvi.

  • Document Header Text in BKPF

    Hello
       In BKPF the document header text is case-sentive.If we search for eg. test* then it would return all the texts starting with test(in small) and if we search for TEST* it would return the texts starting with TEST and not test also.I have a select option(Document Header Text) on the selection screen and irrespective of the case it should select all the texts which i give the search for.For e.g if I give test* then it should return texts starting with (test as well as TEST).How can this be achieved?
    Thanks.

    Hi,
    There is no simple solution to this. Either you build up a select-option yourself with all possible combinations of "test", "Test", "TEST" etc., or you would select all BKPF records in an internal table (usually not a good idea since this is normally a DB-table with many entries) and translate the BKTXT field to upper case and then select your records.
    Regards,
    John.

  • Document header text in Tcode FBl3n

    hello
    Plz help me regarding this issue.
    Our fico consultants demanded to display the document header text in the tcode FBL1n,FBL3n and FBL5n
    So through SPRO by using this path Financial Accounting (new)->General ledger Accounting->Master Data->G/L Acounts -> line items ->Define Special fields for line item Display.
    In this i made the new entry BKPF BKTXT ,
    Now after this field start coming in the above tcodes by setting the layout but the problem is that data inside is not coming and when i go to details the data is there.
    I am not gettting problem to get the data also.
    Now it is showing extra column with header Document header text but it is not showing the data inside it.
    and similar if i doing for someother field both things are coming data and field also.
    WHy this problem for document header text only.
    Plz let me know and give the solutions as soon as possible.
    Thanks a lot.

    Hi,
    You can use READ_TEXT to retreive header text.
    READ_TEXT provides a text for the application program in the specified work areas.
    The function module reads the desired text from the text file, the text memory, or the archive. You must fully specify the text using OBJECT, NAME, ID, and LANGUAGE. An internal work area can hold only one text; therefore, generic specifications are not allowed with these options.
    After successful reading, the system places header information and text lines into the work areas specified with HEADER and LINES.
    You have to used the READ_TEXT functions to read the SAP long text. e.g. Sales Order, Purchase Order Item text etc.
    To check your long text header, go into the long text. Click Goto -> Header
    This will give you OBJECT, NAME, ID, and LANGUAGE.
    Pass them in the FM, you will get the header text that you want.
    Also go through the below link:
    http://help.sap.com/saphelp_40b/helpdata/en/d6/0db8c8494511d182b70000e829fbfe/content.htm
    Hope this will help.
    Thanks&Regards,
    Naresh kumar.

Maybe you are looking for