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.

Similar Messages

  • 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 -  EXIT_SAPLVEDA_001 program ZXVEDU13

    Hi All,
    I am very new to Extensions i.e user exits. there is requirement to make validations in the user exit 'EXIT_SAPLVEDA_001' program ZXVEDU13. There is a structure given for EDI and  SAP orders/contracts from which i have to to create two internal table and the entries are to be made based on some conditions given.
    Please give me some idea on this on how to proceed?
    thanks,
    Poonam

    Hi All,
    I am very new to Extensions i.e user exits. there is requirement to make validations in the user exit 'EXIT_SAPLVEDA_001' program ZXVEDU13. There is a structure given for EDI and  SAP orders/contracts from which i have to to create two internal table and the entries are to be made based on some conditions given.
    Please give me some idea on this on how to proceed?
    thanks,
    Poonam

  • 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

  • Custom error message in user exit is giving Short dump

    Hi All,
    We have a scenario where in if any user try to create/Change/Delete particular types of contract in SAP system we have to issue error message
    saying ZIN/ZIR contract creation/Change/Deletion is blocked in SAP. This has to be done from the web application. So we are putting below code
    in user exit MV45AFZZ in the form USEREXIT_SAVE_DOCUMENT_PREPARE.
    CONSTANTS: lc_vbcpic01 TYPE sy-uname VALUE u2018VBCPIC01u2019, u201CWeb application user ID
             lc_zin           TYPE vbak-auart VALUE u2018ZINu2019,
                         lc_zir            TYPE vbak-auart VALUE u2018ZIRu2019,
                         lc_text(32)    TYPE c VALUE u2018Check long text for more detailsu2019.
    DATA: l_uname TYPE sy-uname.
    CLEAR: l_uname.
    MOVE sy-uname TO l_uname.
    *If user ID is not the Web application ID then block the creation/Change/Deletion
    IF   l_uname NE lc_vbcpic01
    AND ( vbak-auart EQ lc_zin
    OR    vbak-auart EQ lc_zir ).
    MESSAGE e830(zv) WITH lc_text.
    ENDIF.
    This code is working fine while creating/Changing the contract i.e. Giving us error message so that user wonu2019t be able to create/change the contract.
    But when we delete the contract from VA42, Control is coming to this message statement and is giving Short dump. Below is the error analysis of the dump.
    Error Analysis:
    During "Exit Command" processing, the program tried to send a " " message.
    This is not allowed at this point in processing.
    The program had to be terminated.
    Screen name.............. "SAPMV45A"
    Screen number............ 4001
    If any one has come across such scenario/any work around for this problem please let me know your inputs. Your inputs are highly appreciated.
    I am working on 4.6C version of SAP.
    Note: When i issue information/Warning message contract is getting deleted after displaying the message.
    Thanks,
    Vinod.

    I exactly replicated the same in DELETE_DOCUMENT also
    I am getting the Dump. I tried with exit also , but it continued and deleted. To avoid deletion we have to use Leave program or LEAVE TO CURRENT TRANSACTION.
    Delete Function is Defined as EXIT command. so it is not possible to give error message. To convice you i just copied demo program and raised the error message.
    it is also giving the dump.
    copy the demo program DEMO_DYNPRO_AT_EXIT_COMMAND and make this change , information to error .
    MODULE cancel INPUT.
      MESSAGE e888(sabapdocu) WITH text-001 ok_code input1 input2.
      IF ok_code = 'CANCEL'.
        CLEAR ok_code.
        LEAVE PROGRAM.
      ENDIF.
    ENDMODULE.
    and see...

  • Stuctural field in user exit?

    hi all,
    i'm doing user exit enhancement for me21n ,, im using the EXIT -  EXIT_SAPMM06E_014..
    i want to check the field which is entered at the time of creation.. i.e plant in me21n.
    Moderator Message: Basic question. Wrong forum. Thread Locked.
    Edited by: kishan P on Nov 13, 2010 2:40 PM

    Hi Venky,
    If you want to check the plant then use EXIT_SAPMM06E_016. it will get triggered at item level. Check plant in structure I_EKPO-WERKS.
    Thanks & Regards,
    Faheem.

  • Creating delivery, can I check the sales order's field using user-exit or ?

    Hi dear.
    When I create a delivery in VL01N or other transactions, I want automatically to check the sales order's some field and to decide whether create or not.
    Can I use user-exit for that?
    Or other solutions is there?
    Thanks regards

    Yes your requirement can be achieved thru a User Exit.
    There are many User Exits available in Delivery as listed in the link below:
    https://wiki.sdn.sap.com/wiki/display/ERPLO/SDUserexits
    The selection of necessary User Exit is based on your specific requirement.
    Also if you want to check some feild of Sales Order whether it is completed or not, then you can also use Incompletion Procedure in Sales Order, which will make sure that no Sales Order is saved until the end-user enter data in those feilds.
    Hope this helps...
    Thanks,
    Jignesh Mehta

  • How to retrieve the value of field in user exit EXIT_SAPMF(in the include)

    Hello All,
    I am using user exit EXIT_SAPMF02K_001 for limiting the user to input the PAN number upto 10 character and first 4 character should be alphanumeric.I have done the logice and its running fine. The problem i am facing is that i could not get the screen input in the include where i have written the code ie. i am not able to get the screen field when the user exit is executed .In short i m not getting the value of the field ie(J_1IMOVEND-J_1IPANNO) in the code which i have written in the include.
    Can you pls tell me how do i get the value of the field PAN in the code . I have debug the program and it doesnot show any value.
    Reply ASAP.
    Thanks in Adv.
    Pravesh Deshbhratar

    Hi ,
    The Transaction code used is FK02.
    Secondly when i am using the debugger the i m getting into the INCLUDE Of the User Exit EXIT_SAPMF02K_001.
    So i dont think i am using incorrect user exit.
    what is required is field value in the include of EXIT_SAPMFO2K_001.
    Thanks
    Pravesh

  • Populating field code - User Exit

    Hello friends
    I need your help. I am writng a User Exit and i have a requirement.This is my first time writing a User Exit so pelase help me out. First i went to the generic datasource i am trying to extend.I went to the structure in there and added 3 zfields i need.My requirement is that am using a View i created and a generic datasource on it. I need to get WEMNG,WADAT and SLFDT from EKET table where DELKZ= FE
    DELNR = EBELN.
    I need the exact code ill need in ZXRSAU01.How will i call teh datasource and lay down these conditions.Please assist me.

    hi,
       first have a commen field in the itab and e_tata.
    data:begin of itab occurs 0,
    commnon field.
    WEMNG like EKET -WEMNG ,
    WADAT  LIKE EKET-WADAT,
    SLFDT    LIKE  EKET-SLFDT  ,
    END IF ITAB.
    data:i_tab like standard table of e_t_data with header line.
    i_tab[] = e_t_data[].
    select wemng wadat sfldt from eket into table itab where DELKZ= FE
    DELNR = EBELN.
    loop at i_tab.
    read table itab with key fieldname condition.
    i_tab-WEMNG  = itab-wemng.
    i_tab-WADAT   = itab-wadat.
    i_tab-SLFDT    = itab-sfldt.
    modify i_tab index sy-tabix.
    endloop.
    e_t_data[] = i_tab[].
    pls assign points if helpful.

  • 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.

  • 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

  • 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

  • Set Value in a ME22N's field with user exit.

    Every time an PO is create in ME21N or ME22N I need that the user to input some valid Requisitioner in PO's item. These valid Requisitioners are in a Z table.
      Well, to solve this I've used the EXIT_SAPMM06E_017 exit. I call the function F4IF_INT_TABLE_VALUE_REQUEST but it is not bringing the requisitioner I've selected to the field in ME22N the field remains empty.
    data : i_usr   like zmmwfnfusr occurs 0 with header line,
           wa_usr  like DDSHRETVAL occurs 0 with header line.
    IF i_ekpo-afnam IS INITIAL. "The field resquisitioner
      MESSAGE s079(z1) WITH 'Requerente obrigatório para Workflow'
                             'Receb. de NFs.'
                      'Digite um Setor Recebedor cadastrado!'.
    v_repid = sy-repid.
    v_dynnr = sy-dynnr.
       select *                  "My table with requisitioners
       from zmmwfnfusr
       into table i_usr.
       CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
       EXPORTING
        retfield            = 'RECEBEDOR'     "Field name of zmmwfnfusr
        DYNPPROG            = v_repid
        DYNPNR              = v_dynnr
        DYNPROFIELD         = 'TEKPO-AFNAM'    "Tried to guess 
    the field name, tried all namens..
        VALUE_ORG            = 'S'
       TABLES   
         value_tab                 = i_usr
         return_tab                = wa_usr.

    Hi,
    try with this
    process on value-request.
      field AFANAM module onvalue_request_afanam.
    and check what is the field name in the screen which you want to populate the value like (materail) Material is the Dynpro field and MATNR is the retfield
    in the module
    call function 'F4IF_INT_TABLE_VALUE_REQUEST'
        exporting
          retfield        = 'LIFNR' <data element for afanam>
          dynpprog        = sy-repid
          dynpnr          = sy-dynnr
          dynprofield     = 'AFANAM'
          value_org       = 'S'
        tables
         value_tab       = itab
        return_tab = ret_tab
        FIELD_TAB  = FIELD_TAB
        exceptions
          parameter_error = 1
          no_values_found = 2
          others          = 3.
    this should work,
    Cheers,
    Sasi

  • 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

  • Change VBAK in user exit

    Hi
    I append a new field in VBAK.
    In user exit userexit_save_document i need to chnage it. Please let me know any method (Update command is not working in creation mode).
    Thanks and Regards
    Aditya

    Go to the Program MV45AFZZ 
    use the form
    FORM USEREXIT_MOVE_FIELD_TO_VBAK.
    ENDFORM.
    or FORM USEREXIT_SAVE_DOCUMENT,
    FORM USEREXIT_SAVE_DOCUMENT_PREPARE.
    use any of these forms to change the value of your newly added field in VBAK..

Maybe you are looking for