Enhamcement for va01

Hi experts,
I hope u can Resolve this query.......My requirement is in 'XD02' by giving the customer no and the division type. in the next screen in sales document screen and in the billing document tab it will dispaly the payment term tat maintained to the division type.
for eg: customer no : 500010.
division type : 00 common.
division type : 05 some name.
in the second screen.
in sales area data.
in billing document.
In the payment term field tat corresponding to the division type.The Point is the common division '00 ' is also maintained for customer no and payment term is also maintained individually for both division type.
in sales order 'Va01' screen if we enter the order type tat relates to the division type has some values.
My client Requirement is in 'VA01' if they enters the order type and the common division '00' it will enter into the next screen there if we give the 'customer no' it should relate the order type and should brings payment  term  value of 05.
for that found out the enhancement in the standard program 'MV45AFZZ'.
Could you Pls provide Some Code to fill this.
Note: Client says that Not to create any Ztable.
Moderator Message: Specs-dumping for others to resolve is not entertained here.
Edited by: kishan P on Dec 16, 2011 1:30 PM

Hi Arun,
I just remember your post because I play with VA01 in BDC mode. For the text you just have to use the code "TP_DETAIL"
That switch the text mode to sapscript-mode. And you can save long text.
Frédéric

Similar Messages

  • User Exit /BADI for VA01 in 5.0

    Hi,
    I want a BADI or EXIT where I can get the sales order no for the for the sales order which is created
    after saving the data in VA01.
    I have checked the INCLUDE MV45AFZZ. But in none of the exit it gives sales order no.
    And there are no BADI's available in this vesrion (In ECC 6.0 this BADI is there /SAPSLL/CTRL_SD0A_R3)
    I am using server version 5.0.
    regards
    vivek

    Hi,
    Find the user exits for VA01.
    SDAPO001            Activating Sourcing Subitem Quantity Propagation
    SDTRM001            Reschedule schedule lines without a new ATP check
    V45A0001            Determine alternative materials for product selection
    V45A0002            Predefine sold-to party in sales document
    V45A0003            Collector for customer function modulpool MV45A
    V45A0004            Copy packing proposal
    V45E0001            Update the purchase order from the sales order
    V45E0002            Data transfer in procurement elements (PRreq., assembly)
    V45L0001            SD component supplier processing (customer enhancements)
    V45P0001            SD customer function for cross-company code sales
    V45S0001            Update sales document from configuration
    V45S0003            MRP-relevance for incomplete configuration
    V45S0004            Effectivity type in sales order
    V45W0001            SD Service Management: Forward Contract Data to Item
    V46H0001            SD Customer functions for resource-related billing
    V60F0001            SD Billing plan (customer enhancement) diff. to billing plan
    Regards,
    Rajesh Kumar

  • Transaction Variant for VA01

    Hi All,
    I am able to create transaction variant for transaction code MM01, XD01 and XK01 successfully. But i am unable to create transaction variant for VA01.
    And also some times i am getting error message "SAP Object SCV1(short text of variant) cannot be assigned to package ZXXX". Can you pls let me know why i am getting this error and why i am unable to create transaction variant for VA01 successfully.
    Thanks,
    Raju

    Hi,
    There is no difference in creation of the transaction variant for VA01/02. But the way it works is different. It works at order type level instead of t-code level. You have to create the variant in SHD0 and assign the same in order type customization.
    Alternatively you can populate the field TVAK-VARIANT with the transaction variant name in MV45AFZZ subroutine USEREXIT_MOVE_FIELDS_TO_VBAK/USEREXIT_FIELD-MODIFY. With out this it wont work. Just try to change the TVAK-VARIANT value in debug mode and see if it works fine. Surpricingly it works fine if you individually execute the variant.
    The error you mentioned might be because you might have given one of the screen variant name not starting with Z or Y.
    Thanks,
    Vinod.

  • Menu exit for VA01/02/03

    How to find the menu exit for VA01/02/03 transactions?
    Thanks
    Tharani

    hi do like this....use this program and execurte it give the tcode and execute it will give the exits list click on the exit and it will takes to the exit and choose test it gives whether it is a manu exit or function exit..
    REPORT z_find_userexit NO STANDARD PAGE HEADING.
    *&  Enter the transaction code that you want to search through in order
    *&  to find which Standard SAP User Exits exists.
    *& Tables
    TABLES : tstc,     "SAP Transaction Codes
             tadir,    "Directory of Repository Objects
             modsapt,  "SAP Enhancements - Short Texts
             modact,   "Modifications
             trdir,    "System table TRDIR
             tfdir,    "Function Module
             enlfdir,  "Additional Attributes for Function Modules
             tstct.    "Transaction Code Texts
    *& Variables
    DATA : jtab LIKE tadir OCCURS 0 WITH HEADER LINE.
    DATA : field1(30).
    DATA : v_devclass LIKE tadir-devclass.
    *& Selection Screen Parameters
    SELECTION-SCREEN BEGIN OF BLOCK a01 WITH FRAME TITLE text-001.
    SELECTION-SCREEN SKIP.
    PARAMETERS : p_tcode LIKE tstc-tcode OBLIGATORY.
    SELECTION-SCREEN SKIP.
    SELECTION-SCREEN END OF BLOCK a01.
    *& Start of main program
    START-OF-SELECTION.
    Validate Transaction Code
      SELECT SINGLE * FROM tstc
        WHERE tcode EQ p_tcode.
    Find Repository Objects for transaction code
      IF sy-subrc EQ 0.
        SELECT SINGLE * FROM tadir
           WHERE pgmid    = 'R3TR'
             AND object   = 'PROG'
             AND obj_name = tstc-pgmna.
        MOVE : tadir-devclass TO v_devclass.
        IF sy-subrc NE 0.
          SELECT SINGLE * FROM trdir
             WHERE name = tstc-pgmna.
          IF trdir-subc EQ 'F'.
            SELECT SINGLE * FROM tfdir
              WHERE pname = tstc-pgmna.
            SELECT SINGLE * FROM enlfdir
              WHERE funcname = tfdir-funcname.
            SELECT SINGLE * FROM tadir
              WHERE pgmid    = 'R3TR'
                AND object   = 'FUGR'
                AND obj_name = enlfdir-area.
            MOVE : tadir-devclass TO v_devclass.
          ENDIF.
        ENDIF.
    Find SAP Modifactions
        SELECT * FROM tadir
          INTO TABLE jtab
          WHERE pgmid    = 'R3TR'
            AND object   = 'SMOD'
            AND devclass = v_devclass.
        SELECT SINGLE * FROM tstct
          WHERE sprsl EQ sy-langu
            AND tcode EQ p_tcode.
        FORMAT COLOR COL_POSITIVE INTENSIFIED OFF.
        WRITE:/(19) 'Transaction Code - ',
        20(20) p_tcode,
        45(50) tstct-ttext.
        SKIP.
        IF NOT jtab[] IS INITIAL.
          WRITE:/(95) sy-uline.
          FORMAT COLOR COL_HEADING INTENSIFIED ON.
          WRITE:/1 sy-vline,
          2 'Exit Name',
          21 sy-vline ,
          22 'Description',
          95 sy-vline.
          WRITE:/(95) sy-uline.
          LOOP AT jtab.
            SELECT SINGLE * FROM modsapt
            WHERE sprsl = sy-langu AND
            name = jtab-obj_name.
            FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
            WRITE:/1 sy-vline,
            2 jtab-obj_name HOTSPOT ON,
            21 sy-vline ,
            22 modsapt-modtext,
            95 sy-vline.
          ENDLOOP.
          WRITE:/(95) sy-uline.
          DESCRIBE TABLE jtab.
          SKIP.
          FORMAT COLOR COL_TOTAL INTENSIFIED ON.
          WRITE:/ 'No of Exits:' , sy-tfill.
        ELSE.
          FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
          WRITE:/(95) 'No User Exit exists'.
        ENDIF.
      ELSE.
        FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
        WRITE:/(95) 'Transaction Code Does Not Exist'.
      ENDIF.
    Take the user to SMOD for the Exit that was selected.
    AT LINE-SELECTION.
      GET CURSOR FIELD field1.
      CHECK field1(4) EQ 'JTAB'.
      SET PARAMETER ID 'MON' FIELD sy-lisel+1(10).
      CALL TRANSACTION 'SMOD' AND SKIP FIRST SCREEN.
    regards,
    venkat.

  • Global data declaration in user exit 'MV45AFZZ ' for VA01

    Hi folks,
    i  am using USEREXIT_PRICING_PREPARE_TKOMP  in MV45AFZZ for VA01 pricing modification.i need to declare one Global internal table for this exit.i tried to do this one in MV45ATZZ.but i can not save as it is asking access key.
      how can i achieve this one?
    ur answers will be rewarded.
    Thanks
    pabi

    Hi Pabitra,
    You can find the parent program and use an enhancement point to declare a global internal table mainly in the top include of the program
    ed: if t-code ABC is executed then the program for the t-code ABC is your parent program...
    Here SAPMV45A is your parent program for VA01
    and in INCLUDE MV45ATOP.
    use ENHANCEMENT-POINT MV45ATOP_02 SPOTS ES_SAPMV45A STATIC. to declare the global internal table
    Once the table is declared,also check in the user exit by debugging if the table is made available..
    i have done the above technique to use an internal table in userexit_save_document after declaring table in the mentioned enhancement point and it worked for me...
    Pls check and revert
    Reward if useful
    Regards
    Byju

  • Exit For VA01

    Hi Friends,
    I am currently working on exit for va01 and i got the include name ie MV45AFZZ where the exit is written.
    but my main requirement is i want to capture if user changes the ship to address of a perticular sales order i want to block the SO and also if user changes the price of any material i want to capture the change in price of that material and block the sales order.
    Its urgent can one help me.
    Regards,
    DVNS.

    Hi,
    In MV45AFZZ
    we can write code and check VBAK table for the field
    in ( form userexit_save_document. or FORM USEREXIT_MOVE_FIELD_TO_VBAK)
    The logic depends ..eg: you can do a select on the VBAK field by passing the sales number and fetch the KUNNR(ship to) field and compare if the user has changed it.
    or you can check if any code can be read when the field is changed...
    If so throw an eror message .....
    for pricing you can use the exit for reading header/item
    form userexit_pricing_prepare_tkomp.
    form userexit_pricing_prepare_tkomk.
    Blocking usually can be done by throwing an error message...main task will be to identify the correct location in MV45AFZZ and see it it triggers when and where we need
    Pls check and reward if it helps
    Regards
    Byju

  • SHD0 transaction - Set Variant Group for VA01

    Hi Guru,
    please can you help us fixing Variant Group for VA01 transaction, only for specific user?
    We created a standard variant in SHD0 for VA01 tansaction and we assigned this variant to specific user group.
    Problem is that for these users in the group, standard variant is not imported into Sales Order (no screen settings are imported).
    If we assign the same Standard Variant into Order Type it works perfectly.
    Can you help us using this variant also for specific user (Variant Group)?
    Thank you very much
    Kind Regards
    Andrea

    Please do you have any news?
    Thank you very much
    Kind Regards
    Andrea

  • REG copy of transaction variant for VA01

    Hi,
    I need to copy transaction variant for VA01
    After copying transaction variant
    i tried to copy screen varaiants for 4440 its working fine  but for screen 4480 the fields which are to be invisible is not working
    i  tried to use same screen variants still not working
    please suggest if any customization needs to be done.
    thanks ,
    kamalakar

    Hi,
      I guess you don't have assign the transaction variant in TVAK.
      Instead you could have created the z tcode by using the option "transaction with variant(variant transaction)" and given the transaction variant.
    Thanks
    Naren

  • Enhancement for 6201 screen in SAPLV69A for VA01 transaction

    hi experts,
    i need to enhance the 6201 screen in SAPLV69A program for VA01 application,
    is there any user exit for this particular screen.

    Hi,
    Check all for VA01
    Transaction Code - VA01                     Create Sales Order                                                                               
    Exit Name           Description                                                                               
    SDTRM001            Reschedule schedule lines without a new ATP check                               
    V45A0001            Determine alternative materials for product selection                           
    V45A0002            Predefine sold-to party in sales document                                       
    V45A0003            Collector for customer function modulpool MV45A                                 
    V45A0004            Copy packing proposal                                                           
    V45E0001            Update the purchase order from the sales order                                  
    V45E0002            Data transfer in procurement elements (PRreq., assembly)                        
    V45L0001            SD component supplier processing (customer enhancements)                        
    V45P0001            SD customer function for cross-company code sales                               
    V45S0001            Update sales document from configuration                                        
    V45S0003            MRP-relevance for incomplete configuration                                      
    V45S0004            Effectivity type in sales order                                                 
    V45W0001            SD Service Management: Forward Contract Data to Item                            
    V46H0001            SD Customer functions for resource-related billing                              
    V60F0001            SD Billing plan (customer enhancement) diff. to billing plan                                                                               
    No of Exits:         15      
    Rewards if useful.............
    Minal

  • Is there any Menu exit for VA01?

    hi,
    Is there any Menu exit for VA01?

    Hi,
      Refer
    https://forums.sdn.sap.com/click.jspa?searchID=11272994&messageID=5107158
    Regards
    Kiran SURE

  • Urgent: SCREEN EXITS FOR VA01

    Hi all,
    Please tell me what r the screen exits available for VA01 transaction.
    points will be rewarded,
    Thanks in advance,
    SIRI

    USER EXIT
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sapgenie.com/abap/code/abap26.htm
    http://www.sap-img.com/abap/what-is-user-exits.htm
    http://wiki.ittoolbox.com/index.php/HOWTO:Implement_a_screen_exit_to_a_standard_SAP_transaction
    http://www.easymarketplace.de/userexit.php
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sappoint.com/abap/userexit.pdfUser-Exit
    http://www.sap-img.com/ab038.htm
    http://help.sap.com/saphelp_46c/helpdata/en/64/72369adc56d11195100060b03c6b76/frameset.htm
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sap-img.com/abap/what-is-user-exits.htm
    http://expertanswercenter.techtarget.com/eac/knowledgebaseAnswer/0,295199,sid63_gci982756,00.html
    Transaction Code - VA02                     Change Sales Order
    Exit Name           Description
    SDTRM001            Reschedule schedule lines without a new ATP check
    V45A0001            Determine alternative materials for product selection
    V45A0002            Predefine sold-to party in sales document
    V45A0003            Collector for customer function modulpool MV45A
    V45A0004            Copy packing proposal
    V45E0001            Update the purchase order from the sales order
    V45E0002            Data transfer in procurement elements (PRreq., assembly)
    V45L0001            SD component supplier processing (customer enhancements)
    V45P0001            SD customer function for cross-company code sales
    V45S0001            Update sales document from configuration
    V45S0003            MRP-relevance for incomplete configuration
    V45S0004            Effectivity type in sales order
    V45W0001            SD Service Management: Forward Contract Data to Item
    V46H0001            SD Customer functions for resource-related billing
    V60F0001            SD Billing plan (customer enhancement) diff. to billing plan
    No of Exits:         15
    Rewards if useful.........
    Minal

  • ERROR MESSAGE for VA01

    hi all,
         i wanna add a userexit for VA01 in program MV45AFZZ to check if reference field in Accounting Tab is initial before i save this sales order.
         when i add the belowing code in Form USEREXIT_SAVE_DOCUMENT,and press save buttom twice.
    CONSTANTS: c_bukrs_vf TYPE vbak-bukrs_vf VALUE 'PK04',
                 c_auart TYPE vbak-auart VALUE 'ZOR',
                 c_ucomm TYPE sy-ucomm VALUE 'T\04',
                 c_text TYPE char40 VALUE 'Please enter Policy reference',
                 c_type TYPE c VALUE 'E'.
      IF vbak-bukrs_vf EQ c_bukrs_vf
       AND vbak-auart EQ c_auart.
        IF vbak-xblnr IS INITIAL.
          FCODE = FCODE_GLEICHE_SEITE.
          MESSAGE c_text TYPE c_type.
        ENDIF.
      ENDIF.
        there's a error message that 'item 00010 doesn't exist.',then i exit this transaction.
        if i put these code in Form USEREXIT_SAVE_DOCUMENT_PREPARE, it works fine.Could anyone give me any suggestion for the reason?Thanks in advance.
    Thanks and Regards.
    Desmond.Yang
    Edited by: desmondyoung on May 25, 2009 4:08 AM

    Hi Yang
    generally USEREXIT_SAVE_DOCUMENT_PREPARE is used when some validations are required before saving any sales order, here we are not updated any tables.
    While USEREXIT_SAVE_DOCUMENT is used for saving sales order in some tables other then standard or some manipulations required before saving data to tables.
    In  your case you are just validating the sales order not manipulating data, hence go for USEREXIT_SAVE_DOCUMENT_PREPARE.
    try and revert

  • Hi All, Pls send me the recording for va01 by handling table control

    Hi All, Pls send me the recording for va01 by handling table control with 3 or more materials. Pls send me a flat file and code ASAP.
    Thanks&regards.
    Bharat

    Here is a example of similar kind ..plz go through this doc..it will be help hul 4 u
    How to deal with table control / step loop in BDC?
    Steploop and table contol is inevitable in certain transactions. When we run BDC for such transactions, we will face the situation: how many visible lines of steploop/tablecontrol are on the screen? Although we can always find certain method to deal with it, such as function code 'NP', 'POPO', considering some extreme situation: there is only one line visible one the screen,
    our BDC program should display an error message. (See transaction 'ME21', we you resize your screen to let only one row visible, you can not enter mutiple lines on this screen even you use 'NP')
    Now, I find a method with which we can determine the number of visible lines on Transaction Screen from our Calling BDC program. Maybe it is useless to you, but I think it will give your some idea.
    Demo ABAP code has two purposes:
    1. how to determine number of visible lines and how to calculte page number; (the 'calpage' routine has been modify to meet general purpose usage)
    2. using field symbol in BDC program, please pay special attention to the difference in Static
    ASSIGN and Dynamic ASSIGN.
    Now I begin to describe the step to implement my method:
    (I use transaction 'ME21', screen 121 for sample, the method using is Call Transation Using..)
    Step1: go to screen painter to display the screen 121, then we can count the fixed line on this screen, there is 7 lines above the steploop and 2 lines below the steploop, so there are total 9 fixed lines on this screen. This means except these 9 lines, all the other line is for step loop.
    Then have a look at steploop itselp, one entry of it will occupy two lines.
    (Be careful, for table control, the head and the bottom scroll bar will possess another two fixed lines, and there is a maximum number for table line)
    Now we have : FixedLine = 9
    LoopLine = 2(for table control, LoopLine is always equal to 1)
    Step2: go to transaction itself(ME21) to see how it roll page, in ME21, the first line of new page is always occupied by the last line of last page, so it begin with index '02', but in some other case, fisrt line is empty and ready for input.
    Now we have: FirstLine = 0
    or FirstLine = 1 ( in our case, FirstLine is 1 because the first line of new page is fulfilled)
    Step3: write a subroutine calcalculating number of pages
    (here, the name of actual parameter is the same as formal parameter)
    global data: FixedLine type i, " number of fixed line on a certain screen
    LoopLine type i, " the number of lines occupied by one steploop item
    FirstLine type i, " possbile value 0 or 1, 0 stand for the first line of new
    " scrolling screen is empty, otherwise is 1
    Dataline type i, " number of items you will use in BDC, using DESCRIBE to get
    pageno type i, " you need to scroll screen how many times.
    line type i, " number of lines appears on the screen.
    index(2) type N, " the screen index for certain item
    begin type i, " from parameter of loop
    end type i. " to parameter of loop
    *in code sample, the DataTable-linindex stands for the table index number of this line
    form calpage using FixedLine type i (see step 1)
    LoopLine type i (see step 1)
    FirstLine type i (see step 2)
    DataLine type i ( this is the item number you will enter in transaction)
    changing pageno type i (return the number of page, depends on run-time visible line in table control/ Step Loop)
    changing line type i.(visible lines one the screen)
    data: midd type i,
    vline type i, "visible lines
    if DataLine eq 0.
    Message eXXX.
    endif.
    vline = ( sy-srows - FixedLine ) div LoopLine.
    *for table control, you should compare vline with maximum line of
    *table control, then take the small one that is min(vline, maximum)
    *here only illustrate step loop
    if FirstLine eq 0.
    pageno = DataLine div vline.
    if pageno eq 0.
    pageno = pageno + 1.
    endif.
    elseif FirstLine eq 1.
    pageno = ( DataLine - 1 ) div ( vline - 1 ) + 1.
    midd = ( DataLine - 1 ) mod ( vline - 1).
    if midd = 0 and DataLine gt 1.
    pageno = pageno - 1.
    endif.
    endif.
    line = vline.
    endform.
    Step4 write a subroutine to calculate the line index for each item.
    form calindex using Line type i (visible lines on the screen)
    FirstLine type i(see step 2)
    LineIndex type i(item index)
    changing Index type n. (index on the screen)
    if FirstLine = 0.
    index = LineIndex mod Line.
    if index = '00'.
    index = Line.
    endif.
    elseif FirstLine = 1.
    index = LineIndex mod ( Line - 1 ).
    if ( index between 1 and 0 ) and LineIndex gt 1.
    index = index + Line - 1.
    endif.
    if Line = 2.
    index = index + Line - 1.
    endif.
    endif.
    endform.
    Step5 write a subroutine to calculate the loop range.
    form calrange using Line type i ( visible lines on the screen)
    DataLine type i
    FirstLine type i
    loopindex like sy-index
    changing begin type i
    end type i.
    If FirstLine = 0.
    if loopindex = 1.
    begin = 1.
    if DataLine <= Line.
    end = DataLine.
    else.
    end = Line.
    endif.
    elseif loopindex gt 1.
    begin = Line * ( loopindex - 1 ) + 1.
    end = Line * loopindex.
    if end gt DataLine.
    end = DataLine.
    endif.
    endif.
    elseif FirstLine = 1.
    if loopindex = 1.
    begin = 1.
    if DataLine <= Line.
    end = DataLine.
    else.
    end = Line.
    endif.
    elseif loop index gt 1.
    begin = ( Line - 1 ) * ( loopindex - 1 ) + 2.
    end = ( Line - 1 ) * ( loopindex - 1 ) + Line.
    if end gt DataLine.
    end = DataLine.
    endif.
    endif.
    endif.
    endform.
    Step6 using field sysbol in your BDC, for example: in ME21, but you should calculate each item will correponding to which index
    form creat_bdc.
    field-symbols: <material>, <quan>, <indicator>.
    data: name1(14) value 'EKPO-EMATN(XX)',
    name2(14) value 'EKPO-MENGE(XX)',
    name3(15) value 'RM06E-SELKZ(XX)'.
    assign: name1 to <material>,
    name2 to <quan>,
    name3 to <indicator>.
    do pageno times.
    if sy-index gt 1
    *insert scroll page ok_code"
    endif.
    perform calrange using Line DataLine FirstLine sy-index
    changing begin end.
    loop at DataTable from begin to end.
    perform calindex using Line FirstLine DataTable-LineIndex changing Index.
    name1+11(2) = Index.
    name2+11(2) = Index.
    name3+12(2) = Index.
    perform bdcfield using <material> DataTable-matnr.
    perform bdcfield using <quan> DataTable-menge.
    perform bdcfield using <indicator> DataTable-indicator.
    endloop.
    enddo.
    Sample code
    Following is a sample code of handling table control in BDC.
    REPORT Y730_BDC5 .
    *HANDLING TABLE CONTROL IN BDC
    DATA : BEGIN OF IT_DUMMY OCCURS 0,
    DUMMY(100) TYPE C,
    END OF IT_DUMMY.
    DATA : BEGIN OF IT_XK01 OCCURS 0,
    LIFNR(10) TYPE C,
    BUKRS(4) TYPE C,
    EKORG(4) TYPE C,
    KTOKK(4) TYPE C,
    NAME1(30) TYPE C,
    SORTL(10) TYPE C,
    LAND1(3) TYPE C,
    SPRAS(2) TYPE C,
    AKONT(6) TYPE C,
    FDGRV(2) TYPE C,
    WAERS(3) TYPE C,
    END OF IT_XK01,
    BEGIN OF IT_BANK OCCURS 0,
    BANKS(3) TYPE C,
    BANKL(10) TYPE C,
    BANKN(10) TYPE C,
    KOINH(30) TYPE C,
    LIFNR(10) TYPE C,
    END OF IT_BANK.
    DATA : IT_BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE,
    IT_BDCMSGCOLL LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
    CALL FUNCTION 'WS_UPLOAD'
    EXPORTING
    FILENAME = 'C:\VENDOR.TXT'
    FILETYPE = 'ASC'
    TABLES
    DATA_TAB = IT_DUMMY.
    LOOP AT IT_DUMMY.
    IF IT_DUMMY-DUMMY+0(2) = '11'.
    IT_XK01-LIFNR = IT_DUMMY-DUMMY+2(10).
    IT_XK01-BUKRS = IT_DUMMY-DUMMY+12(4).
    IT_XK01-EKORG = IT_DUMMY-DUMMY+16(4).
    IT_XK01-KTOKK = IT_DUMMY-DUMMY+20(4).
    IT_XK01-NAME1 = IT_DUMMY-DUMMY+24(30).
    IT_XK01-SORTL = IT_DUMMY-DUMMY+54(10).
    IT_XK01-LAND1 = IT_DUMMY-DUMMY+64(3).
    IT_XK01-SPRAS = IT_DUMMY-DUMMY+67(2).
    IT_XK01-AKONT = IT_DUMMY-DUMMY+69(6).
    IT_XK01-FDGRV = IT_DUMMY-DUMMY+75(2).
    IT_XK01-WAERS = IT_DUMMY-DUMMY+77(3).
    APPEND IT_XK01.
    ELSE.
    IT_BANK-BANKS = IT_DUMMY-DUMMY+2(3).
    IT_BANK-BANKL = IT_DUMMY-DUMMY+5(10).
    IT_BANK-BANKN = IT_DUMMY-DUMMY+15(10).
    IT_BANK-KOINH = IT_DUMMY-DUMMY+25(30).
    IT_BANK-LIFNR = IT_DUMMY-DUMMY+55(10).
    APPEND IT_BANK.
    ENDIF.
    ENDLOOP.
    LOOP AT IT_XK01.
    REFRESH IT_BDCDATA.
    perform bdc_dynpro using 'SAPMF02K' '0100'.
    perform bdc_field using 'BDC_CURSOR'
    'RF02K-REF_LIFNR'.
    perform bdc_field using 'BDC_OKCODE'
    '/00'.
    perform bdc_field using 'RF02K-LIFNR'
    IT_XK01-LIFNR.
    perform bdc_field using 'RF02K-BUKRS'
    IT_XK01-BUKRS.
    perform bdc_field using 'RF02K-EKORG'
    IT_XK01-EKORG.
    perform bdc_field using 'RF02K-KTOKK'
    IT_XK01-KTOKK.
    perform bdc_dynpro using 'SAPMF02K' '0110'.
    perform bdc_field using 'BDC_CURSOR'
    'LFA1-TELX1'.
    perform bdc_field using 'BDC_OKCODE'
    '/00'.
    perform bdc_field using 'LFA1-NAME1'
    IT_XK01-NAME1.
    perform bdc_field using 'LFA1-SORTL'
    IT_XK01-SORTL.
    perform bdc_field using 'LFA1-LAND1'
    IT_XK01-LAND1.
    perform bdc_field using 'LFA1-SPRAS'
    IT_XK01-SPRAS.
    perform bdc_dynpro using 'SAPMF02K' '0120'.
    perform bdc_field using 'BDC_CURSOR'
    'LFA1-KUNNR'.
    perform bdc_field using 'BDC_OKCODE'
    '/00'.
    perform bdc_dynpro using 'SAPMF02K' '0130'.
    perform bdc_field using 'BDC_CURSOR'
    'LFBK-KOINH(02)'.
    perform bdc_field using 'BDC_OKCODE'
    '=ENTR'.
    DATA : FNAM(20) TYPE C,
    IDX TYPE C.
    MOVE 1 TO IDX.
    LOOP AT IT_BANK WHERE LIFNR = IT_XK01-LIFNR.
    CONCATENATE 'LFBK-BANKS(' IDX ')' INTO FNAM.
    perform bdc_field using FNAM
    IT_BANK-BANKS.
    CONCATENATE 'LFBK-BANKL(' IDX ')' INTO FNAM.
    perform bdc_field using FNAM
    IT_BANK-BANKL.
    CONCATENATE 'LFBK-BANKN(' IDX ')' INTO FNAM.
    perform bdc_field using FNAM
    IT_BANK-BANKN.
    CONCATENATE 'LFBK-KOINH(' IDX ')' INTO FNAM.
    perform bdc_field using FNAM
    IT_BANK-KOINH.
    IDX = IDX + 1.
    ENDLOOP.
    perform bdc_dynpro using 'SAPMF02K' '0130'.
    perform bdc_field using 'BDC_CURSOR'
    'LFBK-BANKS(01)'.
    perform bdc_field using 'BDC_OKCODE'
    '=ENTR'.
    perform bdc_dynpro using 'SAPMF02K' '0210'.
    perform bdc_field using 'BDC_CURSOR'
    'LFB1-FDGRV'.
    perform bdc_field using 'BDC_OKCODE'
    '/00'.
    perform bdc_field using 'LFB1-AKONT'
    IT_XK01-AKONT.
    perform bdc_field using 'LFB1-FDGRV'
    IT_XK01-FDGRV.
    perform bdc_dynpro using 'SAPMF02K' '0215'.
    perform bdc_field using 'BDC_CURSOR'
    'LFB1-ZTERM'.
    perform bdc_field using 'BDC_OKCODE'
    '/00'.
    perform bdc_dynpro using 'SAPMF02K' '0220'.
    perform bdc_field using 'BDC_CURSOR'
    'LFB5-MAHNA'.
    perform bdc_field using 'BDC_OKCODE'
    '/00'.
    perform bdc_dynpro using 'SAPMF02K' '0310'.
    perform bdc_field using 'BDC_CURSOR'
    'LFM1-WAERS'.
    perform bdc_field using 'BDC_OKCODE'
    '/00'.
    perform bdc_field using 'LFM1-WAERS'
    IT_XK01-WAERS.
    perform bdc_dynpro using 'SAPMF02K' '0320'.
    perform bdc_field using 'BDC_CURSOR'
    'WYT3-PARVW(01)'.
    perform bdc_field using 'BDC_OKCODE'
    '=ENTR'.
    perform bdc_dynpro using 'SAPLSPO1' '0300'.
    perform bdc_field using 'BDC_OKCODE'
    '=YES'.
    CALL TRANSACTION 'XK01' USING IT_BDCDATA
    MODE 'A'
    UPDATE 'S'
    MESSAGES INTO IT_BDCMSGCOLL.
    ENDLOOP.
    FORM BDC_DYNPRO USING PROG SCR.
    CLEAR IT_BDCDATA.
    IT_BDCDATA-PROGRAM = PROG.
    IT_BDCDATA-DYNPRO = SCR.
    IT_BDCDATA-DYNBEGIN = 'X'.
    APPEND IT_BDCDATA.
    ENDFORM.
    FORM BDC_FIELD USING FNAM FVAL.
    CLEAR IT_BDCDATA.
    IT_BDCDATA-FNAM = FNAM.
    IT_BDCDATA-FVAL = FVAL.
    APPEND IT_BDCDATA.
    ENDFORM.
    Reward if helpful

  • BADI for VA01

    Hi Experts,
                   As we can create User exit for VA01 to set the default value for sold-to-party. can we set it in BADI. If BADI does not exist then can we create a BADI

    Hi,
    If you need to find out the BADI'S for any transaction then you can follow the steps given below which enable you to find any BADI related to any transaction in a matter of minutes.
    1) Go to the transaction SE37 and locate the function SXV_GET_CLIF_BY_NAME.
    2) Put a breakpoint there.
    3) Now open a new session.
    4) Go to your transaction eg. VA01.
    5) At that time, it will stop at this function module.
    6) Double click on the function field EXIT_NAME or NAME.
    7) That will give us the name of the BADI that is provided in our transaction.
    if it's a BADI implementation, the BADI definition name is 'BADI_SD_SALES' , might be the methods SAVE_DOCUMENT_PREPARE or SAVE_DOCUMENT_PREPARE_PART2.
    You could search existing implementations to this BADI using SE18 -> Implementation -> Overview.
    Another possibility is that these recent changes were made in the old fashioned way using the include-report MV45AFZZ. There it would be the form USEREXIT_SAVE_DOCUMENT_PREPARE. You could check this via SE38.
    Regards.

  • Any screen exit for va01

    Hi frends
    I am creating a sales order for a particular type the (KBETR FIELD IN CONDITIONS TAB)
    for some conditions it is showing editable
    and for some conditions it is showing non editable
    and how can we make the field editable.........
    thanks

    Hi Promod,
    These are the exits present for VA01 transaction.
    SDTRM001            Reschedule schedule lines without a new ATP check
    V45A0002            Predefine sold-to party in sales document
    V45A0003            Collector for customer function modulpool MV45A
    V45A0004            Copy packing proposal
    V45E0001            Update the purchase order from the sales order
    V45E0002            Data transfer in procurement elements (PRreq., assembly)
    V45L0001            SD component supplier processing (customer enhancements)
    V45P0001            SD customer function for cross-company code sales
    V45S0001            Update sales document from configuration
    V45S0003            MRP-relevance for incomplete configuration
    V45S0004            Effectivity type in sales order
    V45W0001            SD Service Management: Forward Contract Data to Item
    V46H0001            SD Customer functions for resource-related billing
    V60F0001            SD Billing plan (customer enhancement) diff. to billing plan
    SDAPO001            Activating Sourcing Subitem Quantity Propagation
    V45A0001            Determine alternative materials for product selection
    based on the description given please check which will be useful for you.
    Regards,
    Sourabh

Maybe you are looking for