Custom sy-ucomm in user exit in SAPMV45A causes error

Hi,
I'm adding custom fields to 'Additional Data B' in VA41/2/3 (contracts).  One of them is a push button to take the user to IW53 (display notifications).  I've added the button on the screen and allocated the function code DISP_NOTIF to it.  The screen already has an OK_CODE type variable defined called FCODE.  All straight forwards so far.
However, if there is no notification associated with the contract then I don't want to do anything.  My code is as follows:
CASE fcode.
WHEN 'DISP_NOTIF'.
IF NOT qmih-qmnum IS INITIAL.
  CALL TRANSACTION 'IW53'.
ELSE.
  MESSAGE i001(00) WITH 'No notif found'.
  CLEAR fcode.
ENDIF.
ENDCASE.
This works but when I've clicked on the green tick on the information message pop-up the code goes back to standard and I get the error:
Flow control: Entry SAPMV45B,     , K0, *   , *   , * is missing in T185
This is because SY-UCOMM still has the value DISP_NOTIF in it.  I've tried clearing this field but it just re-populates itself when it goes out of my screen.
Any ideas?
Gill

I don't think I'm making myself clear as you seem to be repeating what I've just said is not the problem.
My problem is clearing SY-UCOMM.  The fact that this field has a value which the standard SAP program doesn't expect is causing the error.
My problem is not FCODE or clearing FCODE.
Has anyone else got any ideas?
Thanks,
Gill

Similar Messages

  • Error for customer specific Authorization check (User Exit)

    Dear Experts,
    I am facing a problem in PM.
    I have created a maintenace plan for calibration via t code IP42 and mentioned the order type PM05. Scheduling is done for the order. I got the order number.
    I have released the order and got the inspection lot number.
    While entering the results recording through t code QE17, the reluts are out of the specified range, i have given the valuation Rejected, immediately system is giving an error message as below:
    "Error for customer specific Authorization check (User Exit)"
    Though there is no user exit activated in the system, this message is coming and not allowing the result recoring for rejection.
    If I'm entering the result recording within the specified range, then valuation is Accepted and its allowing to save.
    I have checked the following user exits:
    QQMA0002: QM: Authorization Check for Entry into Notif. Transaction
    QQMA0026: PM/SM: Auth. check when accessing notification transaction.
    The above 2 User Exits are not active.
    I have also checked a note 429066. But it says incase of any dump for that user exit only its applicable and more over the current version of the system is ECC 6.0 packae 15, where as that note is applicable upto 4.6C.
    Please some one help me on this issue.
    Thanks and Regards,
    Praveen.

    Dear Pete,
    I have cheked with my technical team, There is no hotpacks updated recently. This is the implementaion project I'm in, so performing the cycle for the first time.
    Any how I got it solved, in T code QE17, after entering the Inspection lot in next screen goto menu path Settings - User settings - Defects recording mention the reprt type and tick on Reprt type Changable.
    At the time of result recording if the valuation is Rejected then it ask for defects recording close that window if not rwequired then save, the error message no longer apperaing now.
    Regards,
    Praveen

  • Filling custom VBAK field in user exit EXIT_SAPLVEDA_001

    Hai Experts,
    I created code and activated the user exit EXIT_SAPLVEDA_001.
    Via an iDoc i want to fill a custom field which is in VBAK.
    EXIT_SAPLVEDA_001 has an changing parameter type dxvbak, after user exit is triggered for the right segment, the custom field is not update in the database tabels!.
    Do i need to take further action?!
    Code below
    *&  Include           ZXVEDU03
    DATA: BEGIN OF lw_dxvbak.                  "Kopfdaten
            INCLUDE STRUCTURE vbak.
    DATA:  bstkd LIKE vbkd-bstkd.
    *DATA:  KURSK(8)   TYPE C.
    DATA:  kursk LIKE vbkd-kursk.          "Währungskurs
    DATA:  zterm LIKE vbkd-zterm.          "Zahlungsbedingungsschlüssel
    DATA:  inco1 LIKE vbkd-inco1.          "Incoterms Teil 1
    DATA:  inco2 LIKE vbkd-inco2.          "Incoterms Teil 2
    DATA:  prsdt LIKE vbkd-prsdt.          "Datum für Preisfindung
    DATA:  angbt LIKE vbak-vbeln.          "Angebotsnummer Lieferant (SAP)
    DATA:  contk LIKE vbak-vbeln.          "Kontraknummer Lieferant (SAP)
    DATA:  kzazu LIKE vbkd-kzazu.          "Kz. Auftragszusammenführung
    DATA:  fkdat LIKE vbkd-fkdat.          "Datum Faktura-/Rechnungsindex
    DATA:  fbuda LIKE vbkd-fbuda.          "Datum der Leistungserstellung
    DATA:  empst LIKE vbkd-empst.          "Empfangsstelle
    DATA:  valdt LIKE vbkd-valdt.          "Valuta-Fix Datum
    DATA:  kdkg1 LIKE vbkd-kdkg1.          "Kunden Konditionsgruppe 1
    DATA:  kdkg2 LIKE vbkd-kdkg2.          "Kunden Konditionsgruppe 2
    DATA:  kdkg3 LIKE vbkd-kdkg3.          "Kunden Konditionsgruppe 3
    DATA:  kdkg4 LIKE vbkd-kdkg4.          "Kunden Konditionsgruppe 4
    DATA:  kdkg5 LIKE vbkd-kdkg5.          "Kunden Konditionsgruppe 5
    DATA:  delco LIKE vbkd-delco.          "vereinbarte Lieferzeit
    DATA:  abtnr LIKE vbkd-abtnr.          "Abteilungsnummmer
    DATA:  dwerk LIKE rv45a-dwerk.         "disponierendes Werk
    DATA:  angbt_ref LIKE vbkd-bstkd.      "Angebotsnummer Kunde (SAP)
    DATA:  contk_ref LIKE vbkd-bstkd.      "Kontraknummer Kunde  (SAP)
    DATA:  currdec LIKE tcurx-currdec.     "Dezimalstellen Währung
    DATA:  bstkd_e LIKE vbkd-bstkd_e.      "Bestellnummer Warenempfänger
    DATA:  bstdk_e LIKE vbkd-bstdk_e.      "Bestelldatum Warenempfänger
    DATA: END OF lw_dxvbak.
    CASE segment-segnam.
      WHEN 'ZE1EDK18' . " Name of customer segment
        MOVE segment-sdata TO ze1edk18.
        lw_dxvbak-zkostl = ze1edk18-zkostl.
        MOVE lw_dxvbak TO dxvbak.
    ENDCASE.
    Edited by: Richard van Veen on Mar 9, 2011 1:43 PM

    Filled dxbdcdata with following values!
    DATA lw_dxbdcdata LIKE LINE OF dxbdcdata.
    CASE segment-segnam.
      WHEN 'ZE1EDK18' . " Name of customer segment
        MOVE segment-sdata TO ze1edk18. " Data receives structure
        lw_dxvbak-zkostl = ze1edk18-zkostl. " Copy to application table
        MOVE lw_dxvbak TO dxvbak.
        lw_dxbdcdata-program = 'SAPMV45A'.
        lw_dxbdcdata-dynpro = '0101'.
        lw_dxbdcdata-dynbegin = 'X'.
        lw_dxbdcdata-fnam = 'ZKOSTL'.
        lw_dxbdcdata-fval = ze1edk18-zkostl.
        append lw_dxbdcdata to dxbdcdata.
    ENDCASE.

  • Problem in filling Custom segment data using User Exit for ZORDERS05

    Hi,
    I am using Process Code SD10 to generate the custom Idoc ZORDERS05.
    The function module used is IDOC_OUTPUT_ORDRSP.
    I am able to succesfully generate the Custom Idoc (VA02->Extras->Header->Edit) but unable to populate the custom segments in the IDOC.
    I have tried to write the code in User Exit EXIT_SAPLVEDC_003 -> ZXVEDU15. But still I'm unable to populate the Z segments.
    Even though I place a break point in the FM or in the User Exit during the generation of Idoc the control doesn't stop in FM nor in the User Exit.
    I am unable to understand how to go about this.
    Can anybody please help me with this?
    Thanks in Adavance,
    Rohan.

    Okay I under what you are speaking about NACE.
    Yes that configuration has been done and I am sucessfully able to generate the IDOC.
    But even though I know that in FM IDOC_OUTPUT_ORDRSP, I have to write code in User Exit EXIT_SAPLVEDC_003 to populate the Z segments; I'm unable to understand y the control doesn't pick the FM and Exit.
    Right now I have code in the Exit to fill Z segments.
    Thanks
    Rohan.

  • USER EXIT FOR SAPMV45A

    hi all,
    id like to ask if you have any known user exit that could answer my problem
    i have a routine here that updates message control upon changing of the field werks in the line item.
    however, there are instances when output message is not updated.
    what might cause this problem? what must i do to solve this?
    thanks,
    audi

    SD exits are the "original" exit type....
    look in se80 for the includes of SAPMV45A....there are more than just MV45AFZZ in the exit includes...and these exits are not controlled by CMOD...and they're always turned ON if the code is activated....find the correct subroutine to insert your data....beware of what you put into document save....the save...prepare is the last place where you can actually change something in the SD data.

  • Adding entries to Custom table from IDOC User-Exit

    Hi All,
       I need to add an entry into a Ztable, based on the entries in the IDOC.. The user-exit available to me is EXIT_SAPLVEDF_002.  But it is called a number of times... Is there any way to update the Ztable getting the data from different segments?..
    Please help..
    Regards.
    Asha

    The table INT_EDIDD type EDIDD conatined the interface tables of the FM contain all the segmanent data, you can read that and populate the Z table respectively ...
    Thanks,
    Adi.

  • Customer Credit Balance with user exit: LVKMPFZ1

    Hi SD Gurus,
    Is it possible to use exit:LVKMPFZ1 with USER 1 in transaction OVA8 to be able not to check credit limit when the customer has credit balance....If possible, please advise.
    Thanks
    Themba

    Hi,
    Good evening and greetings,
    In the dunning procedure, FBMP transaction code click on the Dunning Levels and inside the dunning levels there is an option under the print parameter tab to print all items...Check that box and the system would include even the credit line items lying in the customer account and that can be printed out.
    Please reward points if found useful
    Thanking you
    With kindest regards
    Ramesh Padmanabhan

  • Unlock custom table entries after user exits using /n

    Hello,
    I want to lock a record in a custom table at the beginning when users execute a transaction. Users do various activities and save the change then the lock can be released. My issue here is after I lock when the user execute the transaction, if the user does not save or come out using exit keys, for example press /n or just close the session, I need to still unlock the record. Could any one pls suggest what is the best approach. How does sap handles when we use VA02 and just close the session?
    Many thanks
    Ramesh

    Ramesh,
    You need to check for the other actions besides save.  Perform the same unlock for other action as you currently do for a save. 
    If SAVE.
    unlock.
    Else
    unlock
    endif.
    Bruce

  • Screen user exit : program sapmv45a screen 8309

    Hi,
    I added fields to screen 8309 , but in the flow logic of the screen 8309 system is not allowing any code(call modules) to write ( i already given the access key and designed the screen) .
    when i searched forums i came to one command
    *{ INSERT "TR No" 1
    module XXXX.
    *} INSERT
    i could not understand the above command .......
    Ram

    Hi,
    the code for screen Validation has to write in Include 'MV45AFZZ'.
    Search for the T-code VA01--Check for form routine ""userexit_field_modification
    "  and add your manual code..
    Regards,
    Prabhudas

  • User exit - stop processing with error message displayed

    Hi guys,
    My scenario is like this
    Whil doing migo for the same batch number more than 3 times i should not allow to post the document.
    I have the material number and batch number in a seperate ztable
    for checking this found out there is an exit.
    Enhacmenet - MBCF0002
    EXIT_SAPMM07M_001
    I have written code in the above exit as
    select count(*) from ztable
        into t_charg
         where matnr eq i_mseg-matnr
        and charg eq i_mseg-charg.
    if t_charg gt 3.
      call function 'POPUP_DISPLAY_MESSAGE'
        exporting
          titel = 'Error Message'
          msgid = 'BD'
          msgty = 'E'
          msgno = '899'
          msgv1 = 'Batch Already Received 3 Times'.
    if sy-ucomm = 'OKAY'.
    elseif sy-ucomm = 'RW'.
    else.
    endif.
    endif.
    The program works fine and gives a pop up message and when i post the document
    it still gets posted.
    I should not allow to post the document
    Help me on this issue?
    Regards
    Senthil

    thanx for the reply
    Ihave created a message class z001 and maintained a message(001)
    but when i am trying to activate it says
    Field "Z001" is unknown. It is neither in one of the specified tables nor defined by a "DATA" statement . . . . . . . . . .          
    whether i need to include anything  in the program for message class
    senthil

  • User Exits for Invoice creation ,cancellation and sales return

    Hi Gurus,
    Pl help me it's very urgent.
    I did not find any user exit invoice creation so i wrote the following code in include program
    MV60AF0B_BELEG_SICHERN.
    This code is to update the Z*table while saving invoice ,cancellation and sales return.
    The code modification is like below
          FORM BELEG_SICHERN                                            *
          Buchen Fakturabelege                                          *
    FORM BELEG_SICHERN.
      READ TABLE XVBRK INDEX 1.
      IF SY-SUBRC NE 0.
        CALL FUNCTION 'DEQUEUE_ALL'.
        MESSAGE S032.
        EXIT.
      ENDIF.
      IF SAMH_MOD = ON.
        EXPORT XKOMFK TO MEMORY ID 'SDBILLDL'.
      ENDIF.
      DATA: CALC_TYPE.
      IF REBATE_DETERMINED = 'Y'.
        CALC_TYPE = 'A'.
      ELSE.
        CALC_TYPE = 'I'.
      ENDIF.
    *{   INSERT         RD1K903017                                        1
    Work Area*********************
    data : wa_xvbrk type VBRKVB.
    data : wa_xvbrp type vbrpvb.
    data : wa_zmigo type zmigo.
    data : wa_vbrp type vbrp.
    Internal table Creation*******
    DATA:  BEGIN OF tab_XVBRP OCCURS 100.
             INCLUDE STRUCTURE VBRPVB.
    DATA:  END OF tab_XVBRP.
    data : begin of tab_vbeln occurs 10,
           vbeln type vbrk-vbeln,
           knumv type vbrk-knumv,
           end of tab_vbeln.
    data : tab_zmigo type table of zmigo.
    data : tab_vbrp type table of vbrp.
    *****Data declaration*************
    data : v_no_of_inv type i.
    data : v_vbeln_no(10) type n.
    data : v_last_inv_no(10) type n.
    data : v_first_inv_no(10) type c.
    data : v_tot_qty type i.
    data : v_frbnr type mkpf-frbnr.
    *******Ranges*********************
    ranges : r_vbeln for vbrk-vbeln.
    *****Populating IT****************
    tab_xvbrp[] = xvbrp[].
    describe table xvbrk lines v_no_of_inv.
    *}   INSERT
      CALL FUNCTION 'RV_INVOICE_DOCUMENT_ADD'
           EXPORTING
                VBSK_I           = VBSK
                WITH_POSTING     = 'A'
                PREISFINDUNGSART = CALC_TYPE
           IMPORTING
                VBSK_E           = VBSK
           TABLES
                XKOMFK           = XKOMFK
                XTHEAD           = XTHEAD
                XVBFS            = XVBFS
                XVBSS            = XVBSS
                XVBRK            = XVBRK
                XVBRP            = XVBRP
                XVBPA            = XVBPA
                XKOMV            = XKOMV.
    *{   INSERT         RD1K903017                                        2
    data : v_count type i,v_fkimg type i .
    data : v_no_of_records(10) type n.
    wa_xvbrk = xvbrk.
    ********Selecting the last rec no from ZMIGO
          select max( sr_no ) from zmigo into v_no_of_records.
    *****If Distribution channel is not ZB*********
    if  wa_xvbrk-vtweg ne 'ZB' and ( wa_xvbrk-fkart = 'ZRIN' or wa_xvbrk-fkart = 'ZRTE' ).
    if v_no_of_inv = 1.              " Process only when there is one invoice
    loop at tab_xvbrp into wa_xvbrp  where (           matnr ne 'CDGSTP0001'       and
                                                       matnr ne 'CD-RW'            and
                                                       matnr ne 'CD-RW65OHS'       and
                                                       matnr ne 'CABLE'            and
                                                       matnr ne 'CD-R'             and
                                                       matnr ne 'CDQ80N4'          and
                                                       matnr ne 'GENERAL'          and
                                                       matnr ne 'NERO'             and
                                                       matnr ne 'OTHERS'           and
                                                       matnr ne 'SPARE PARTS'      and
                                                       matnr ne 'PROMO ITEM'       and
                                                       matnr ne 'PROMO-1'          and
                                                       matnr ne 'PROMO-2'          and
                                                       matnr ne 'PROMO-3'          and
                                                       matnr ne 'PROMO-4'          and
                                                       matnr ne 'PROMO-5'          and
                                                       matnr ne 'PROMO-6'          and
                                                       matnr ne 'PROMO-7'          and
                                                       matnr ne 'PROMO-8'          and
                                                       matnr ne 'PROMO-9'          and
                                                       matnr ne 'PROMO-10' ).
    v_fkimg = wa_xvbrp-fkimg .
    v_fkimg = v_fkimg / 1000.
                do v_fkimg times.
                  v_no_of_records = v_no_of_records + 1.
                  wa_zmigo-sr_no = v_no_of_records.
                  wa_zmigo-po_no = wa_xvbrk-vbeln.
                  wa_zmigo-item_no  = wa_xvbrp-posnr.
                 wa_zmigo-mblnr  = wa_xmkpf-mblnr.
                  wa_zmigo-doc_type = wa_xvbrk-fkart.
                  wa_zmigo-posting_date = wa_xvbrk-fkdat.
                  wa_zmigo-created_on = sy-datum.
                  wa_zmigo-created_time = sy-uzeit.
                 wa_zmigo-bill_lno = v_frbnr.
                  wa_zmigo-material = wa_xvbrp-matnr.
                 wa_zmigo-inv_no = wa_xvbrk-vbeln.
                 wa_zmigo-inv_item_no = wa_xvbrp-posnr.
                  wa_zmigo-plant = wa_xvbrp-werks.
                  wa_zmigo-inv_date = wa_xvbrk-fkdat.
                  wa_zmigo-customer = wa_xvbrk-kunag.
                  wa_zmigo-unit = 1.
                  wa_zmigo-mtype = '601'.
                  insert into zmigo values wa_zmigo.
                enddo.
                clear : wa_zmigo.
    endloop.
    clear : v_count,v_fkimg,wa_zmigo.
    refresh tab_zmigo[].
    clear v_no_of_inv.
    else.                              "When there are Split Invoices
    v_last_inv_no = wa_xvbrk-vbeln.
    v_vbeln_no = v_last_inv_no - v_no_of_inv + 1.
    v_first_inv_no = v_vbeln_no.
    sort tab_xvbrp by vbeln.
    loop at tab_xvbrp into wa_xvbrp  where (           matnr ne 'CDGSTP0001'       and
                                                       matnr ne 'CD-RW'            and
                                                       matnr ne 'CD-RW65OHS'       and
                                                       matnr ne 'CABLE'            and
                                                       matnr ne 'CD-R'             and
                                                       matnr ne 'CDQ80N4'          and
                                                       matnr ne 'GENERAL'          and
                                                       matnr ne 'NERO'             and
                                                       matnr ne 'OTHERS'           and
                                                       matnr ne 'SPARE PARTS'      and
                                                       matnr ne 'PROMO ITEM'       and
                                                       matnr ne 'PROMO-1'          and
                                                       matnr ne 'PROMO-2'          and
                                                       matnr ne 'PROMO-3'          and
                                                       matnr ne 'PROMO-4'          and
                                                       matnr ne 'PROMO-5'          and
                                                       matnr ne 'PROMO-6'          and
                                                       matnr ne 'PROMO-7'          and
                                                       matnr ne 'PROMO-8'          and
                                                       matnr ne 'PROMO-9'          and
                                                       matnr ne 'PROMO-10' ).
    v_fkimg = wa_xvbrp-fkimg .
    v_fkimg = v_fkimg / 1000.
                do v_fkimg times.
                  v_no_of_records = v_no_of_records + 1.
                  wa_zmigo-sr_no = v_no_of_records.
                  wa_zmigo-po_no = v_vbeln_no.                      "wa_vbrp-vbeln.
                  wa_zmigo-item_no  = wa_xvbrp-posnr.
                 wa_zmigo-mblnr  = wa_xmkpf-mblnr.
                  wa_zmigo-doc_type = wa_xvbrk-fkart.
                  wa_zmigo-posting_date = wa_xvbrk-fkdat.
                  wa_zmigo-created_on = sy-datum.
                  wa_zmigo-created_time = sy-uzeit.
                 wa_zmigo-bill_lno = v_frbnr.
                  wa_zmigo-material = wa_xvbrp-matnr.
                 wa_zmigo-inv_no = v_vbeln_no.
                 wa_zmigo-inv_item_no = wa_xvbrp-posnr.
                  wa_zmigo-plant = wa_xvbrp-werks.
                  wa_zmigo-inv_date = wa_xvbrk-fkdat.
                  wa_zmigo-customer = wa_xvbrk-kunag.
                  wa_zmigo-unit = 1.
                  wa_zmigo-mtype = '601'.
                  insert into zmigo values wa_zmigo.
                enddo.
                clear : wa_zmigo.
    at end of vbeln.
    v_vbeln_no = v_vbeln_no + 1.
    endat.
    clear : v_count,v_fkimg,wa_zmigo.
    refresh tab_zmigo[].
    endloop.
    endif.                             "End of first 2nd IF.
    clear : v_no_of_inv, v_vbeln_no.
    endif.
    ****************Sales return************************************
    if  wa_xvbrk-fkart = 'ZRRE' and wa_xvbrk-vtweg ne 'ZB'.
    loop at tab_xvbrp into wa_xvbrp where (            matnr ne 'CDGSTP0001'       and
                                                       matnr ne 'CD-RW'            and
                                                       matnr ne 'CD-RW65OHS'       and
                                                       matnr ne 'CABLE'            and
                                                       matnr ne 'CD-R'             and
                                                       matnr ne 'CDQ80N4'          and
                                                       matnr ne 'GENERAL'          and
                                                       matnr ne 'NERO'             and
                                                       matnr ne 'OTHERS'           and
                                                       matnr ne 'SPARE PARTS'      and
                                                       matnr ne 'PROMO ITEM'       and
                                                       matnr ne 'PROMO-1'          and
                                                       matnr ne 'PROMO-2'          and
                                                       matnr ne 'PROMO-3'          and
                                                       matnr ne 'PROMO-4'          and
                                                       matnr ne 'PROMO-5'          and
                                                       matnr ne 'PROMO-6'          and
                                                       matnr ne 'PROMO-7'          and
                                                       matnr ne 'PROMO-8'          and
                                                       matnr ne 'PROMO-9'          and
                                                       matnr ne 'PROMO-10' ).
             v_fkimg = wa_xvbrp-fkimg.
             v_fkimg = v_fkimg / 1000.
             v_tot_qty = v_tot_qty + v_fkimg.
              do v_fkimg times.
                v_no_of_records = v_no_of_records + 1.
                wa_zmigo-sr_no = v_no_of_records.
                wa_zmigo-po_no = wa_xvbrk-vbeln.
                wa_zmigo-item_no  = wa_xvbrp-posnr.
                wa_zmigo-doc_type = wa_xvbrk-fkart.
                wa_zmigo-posting_date = wa_xvbrk-fkdat.
                wa_zmigo-created_on = sy-datum.
                wa_zmigo-created_time = sy-uzeit.
                wa_zmigo-material = wa_xvbrp-matnr.
               wa_zmigo-inv_no = wa_xvbrk-vbeln.
               wa_zmigo-inv_item_no = wa_xvbrp-posnr.
                wa_zmigo-plant = wa_xvbrp-werks.
                wa_zmigo-inv_date = wa_xvbrk-fkdat.
                wa_zmigo-customer = wa_xvbrk-kunag.
                wa_zmigo-unit = 1.
                wa_zmigo-mtype = '651'.
                condense wa_xvbrk-xblnr.
                wa_zmigo-reference = wa_xvbrk-xblnr.
    ********Bill of lading no**
               select single bill_lno from zmigo_final into v_frbnr where inv_no = wa_xvbrk-xblnr and material = wa_xvbrp-matnr.
               if sy-subrc eq 0.
               wa_zmigo-bill_lno = v_frbnr.
               endif.
                insert into zmigo values wa_zmigo.
              enddo.
              clear : wa_zmigo,wa_xvbrp , v_fkimg, v_frbnr.
    endloop.
    endif.
    *******Invoice Cancellation*****************************
    if  wa_xvbrk-fkart = 'ZRS1' and wa_xvbrk-vtweg ne 'ZB'.
    delete tab_xvbrp[] where shkzg eq 'X'.
    loop at tab_xvbrp into wa_xvbrp where (            matnr ne 'CDGSTP0001'       and
                                                       matnr ne 'CD-RW'            and
                                                       matnr ne 'CD-RW65OHS'       and
                                                       matnr ne 'CABLE'            and
                                                       matnr ne 'CD-R'             and
                                                       matnr ne 'CDQ80N4'          and
                                                       matnr ne 'GENERAL'          and
                                                       matnr ne 'NERO'             and
                                                       matnr ne 'OTHERS'           and
                                                       matnr ne 'SPARE PARTS'      and
                                                       matnr ne 'PROMO ITEM'       and
                                                       matnr ne 'PROMO-1'          and
                                                       matnr ne 'PROMO-2'          and
                                                       matnr ne 'PROMO-3'          and
                                                       matnr ne 'PROMO-4'          and
                                                       matnr ne 'PROMO-5'          and
                                                       matnr ne 'PROMO-6'          and
                                                       matnr ne 'PROMO-7'          and
                                                       matnr ne 'PROMO-8'          and
                                                       matnr ne 'PROMO-9'          and
                                                       matnr ne 'PROMO-10' ).
             v_fkimg = wa_xvbrp-fkimg.
             v_fkimg = v_fkimg / 1000.
             v_tot_qty = v_tot_qty + v_fkimg.
              do v_fkimg times.
                v_no_of_records = v_no_of_records + 1.
                wa_zmigo-sr_no = v_no_of_records.
                wa_zmigo-po_no = wa_xvbrk-vbeln.
                wa_zmigo-item_no  = wa_xvbrp-posnr.
                wa_zmigo-doc_type = wa_xvbrk-fkart.
                wa_zmigo-posting_date = wa_xvbrk-fkdat.
                wa_zmigo-created_on = sy-datum.
                wa_zmigo-created_time = sy-uzeit.
                wa_zmigo-material = wa_xvbrp-matnr.
               wa_zmigo-inv_no = wa_xvbrk-vbeln.
               wa_zmigo-inv_item_no = wa_xvbrp-posnr.
                wa_zmigo-plant = wa_xvbrp-werks.
                wa_zmigo-inv_date = wa_xvbrk-fkdat.
                wa_zmigo-customer = wa_xvbrk-kunag.
                wa_zmigo-unit = 1.
                condense wa_xvbrk-zuonr.
                wa_zmigo-reference = wa_xvbrk-zuonr.
                wa_zmigo-mtype = '602'.
    ********Bill of lading no**
               select single bill_lno from zmigo_final into v_frbnr where inv_no = wa_xvbrk-xblnr and material = wa_xvbrp-matnr.
               if sy-subrc eq 0.
               wa_zmigo-bill_lno = v_frbnr.
               endif.
                insert into zmigo values wa_zmigo.
              enddo.
              clear : wa_zmigo,wa_xvbrp , v_fkimg.
    endloop.
    endif.
    clear : v_no_of_records.
    *}   INSERT
      CALL FUNCTION 'STACK_RESET'.
      R185D-DATALOSS = SPACE.
      FOLGEAUFRUF102 = SPACE.
      PERFORM SETPAR_INIT.
    *{   INSERT         RD1K903017                                        3
    *}   INSERT
      LEAVE.
    ENDFORM.
    This program is working fine for single user but in production where no of people are creating the invoices from different places the data is not getting updated in table ZMIGO.
    sometime populating with wrong data , partial data and sometimes no updation at all.
    I have used the table locking system enqueue and dequeue FM's before n after updation but still the same
    thing is happening.
    What could be the reason.
    Looking for help very urgent any other alternate option.

    Hi,
    Go thru these..
    Enhancement
    SDVFX009 Billing doc. processing KIDONO (payment reference numbe
    SDVFX010 User exit item table for the customer lines
    SDVFX011 Userexit for the komkcv- and kompcv-structures
    V05I0001 User exits for billing index
    V05N0001 User Exits for Printing Billing Docs. using POR Procedu
    V60A0001 Customer functions in the billing document
    V60P0001 Data provision for additional fields for display in lis
    V61A0001 Customer enhancement: Pricing
    SDVFX001 User exit header line in delivery to accounting
    SDVFX002 User exit for A/R line (transfer to accounting)
    SDVFX003 User exit: Cash clearing (transfer to accounting)
    SDVFX004 User exit: G/L line (transfer to accounting)
    SDVFX008 User exit: Processing of transfer structures SD-FI
    SDVFX007 User exit: Billing plan during transfer to Accounting
    SDVFX006 User exit: Tax line (transfer to accounting)
    SDVFX005 User exit: Reserves (transfer to accounting)
    Business Add-in
    SD_CIN_LV60AU02 BADI for billing
    If it is helpful rewards points
    Regards
    Pratap.M

  • User Exit for KP90 to add Company Code

    Hi Experts,
    I need to add company code to the selection criteria of the KP90 transaction
    and thereby  clear plan data by company code.
    Please let me know the User Exit for the same or the way i should search for one.
    Or shall i instead create a Z program to meet the above requirement.
    Please help.

    Go to SE80 - choose program - SAPMV45A - Screen number 8309 - this is the screen exit to add fields in Additional data b
    You can write your own code for this screen and Try to use other user exits in SAPMV45A program and make sure you use transaction type or Sy-Tcode as the same program is used for quote and sales orders tooo
    Good luck

  • User exit for pricing in Sales Order

    Hi Gurus,
    I have a requirement while changing Sales Order and an Inquiry.Below is the requirement.
    I have a custom filed at the Sales Order Item level as VBAP-XXXXX. When the user changes this value to a value (say abc) then the NET value in the Conditions tab of the line item should become zero and also the grid of the conditions tab should be displayed as zero.
    I have custom item categories for which the Pricing (TVAP-PRSFD) is blank (No pricing). For this type of Item categories I can make the NET price s ZERO by implementing some custom logic in the user exit userexit_new_pricing_vbap. Since this item category is not relavant for pricing then when I carry out new pricing the net value is set to ZERO.
    But for other item categories, this field (TVAP-PRSFD) is set to X (Pricing standard). For this item categories I cant make the NET value as zero.
    So Can you please let me know the possibility of implementing the above mentioned logic?
    Are they any user exit to update the pricing table KOMP?
    Are they any user exit to change the TVAP-PRSFD value based on my requirements?
    Is there any other way of implementing this logic irrespective of item categories?

    Hi Vinod,
    I am sending you my code please check it,
       if TKOMK-SPART = 10.
        if XKOMV is not INITIAL.
          clear v_JEXP.
        READ TABLE XKOMV with key kschl = 'JEXP'.
        if sy-subrc = 0.
          check XKOMV-kwert = 0.
          message i003(ZT) with 'Value should not be 0 for conditioin type JEXP'.
          v_JEXP = 'X'.
        else.
          message i003(ZT) with 'Maintain the mandatory Conditioin type JEXP'.
          v_JEXP = 'X'.
        endif.
        if v_JEXP = 'X'.
      XVBUV-MANDT = sy-mandt.
      XVBUV-POSNR = '000010'.
      XVBUV-TBNAM = 'VBAP'.
      XVBUV-FDNAM = 'PRSOK'.
      XVBUV-FEHGR = 20.
      XVBUV-STATG = '06'.
      XVBUV-FCODE = 'PKON'.
      XVBUV-SORTF = 9999.
      XVBUV-LFDNR = 0000.
      XVBUV-UPDKZ = 'I'.
      append XVBUV.
        endif.
    endif.
    endif.
    Please suggest something to solve this.
    Thanks and Regards,
    Vicky.

  • Message user-exit handling in Portal

    Via customizing there is a user-exit for update travel-declaration in the Portal. (exit_sapmp56t_002)
    you can pass through parameter (continue with update).
    if this isn't  a 'Y', a message is generated and updating is not possible.
    But there are several circumstances for checking, but there is only one message possible.
    (From message-class PTRA_WEB_INTERFACE and message 905 )
    We would like to create several messages.
    Is this possible and how do you do this?
    with kind regards
    Jan Weegels

    Hi
    There can be one other method to fulfill your requirement. If you want a check only on address field, there might be a field exit for this address field.
    Check out the technical name of the field where you want to check and note down the data element name mentioned in data dictionary.
    RSMODPRF . In the input screen, paste that data element behind the address field and press F8. If there is a field exit for this, it will come up in the output and you can code a simple check for this field in t-code PZ02.
    Moreover, if there is none for your required data element, then it will help you to create one. Do read the Information mentioned on the input screen. it will tell you about the coding and constraints of a field exit.
    Regards
    Waz
    Edited by: Waz on Feb 12, 2008 10:39 AM

  • Find User Exit or BADI

    Hi all,
    When I worked in the version 4.6 I used to use the object v_ext_act, v_ext_imp and the transaction St05 to find a user exit or a badi when I need it. But since I started to work in the version 6.0 it seems that with these objects I can't find anything.
    Any of you know if SAP has changed the name of these objects?
    Thanks

    Hi Raul,
    Another approach that you can use in order to find out user-exit or badi in a program or transaction is to start execution of it in debug mode and then put a break-point in following statements:
    CALL CUSTOMER-FUNCTION --> to find user-exits.
    CALL BADI --> to find BADI's
    Then just press F8 and SAP will stop whenever a user-exit or badi is invoked.
    Hope this helps.
    Cheers.

Maybe you are looking for