Structure KOMP

Dear ABAP,
I am an SD consultant and would like to ask you a simple question:
In a pricing formula using structure KOMP will we be able to cumulate quantities (mgame) if multiple items exist?
Thanks for letting me know
Kikas41

Closed but not answered

Similar Messages

  • New Field Addition in Structure KOMP

    *Hi,
    We have requirement of having Material Description field in the Allowed Field Catalogs in order to fetch the same from Pricing Condition Table. Hence, as a first step, have added the MAKTX field inside the ZStructure inside Main Structure KOMP and activated the same. Then i have added the same field in Allowed Field Catologs of Pricing.
    Now i have tried to create a new Pricing Condition Table with field catalog of Material Description (the added field), but there is no such field is available for selection.
    Is there anything i missed to do, so that the newly added field is available during New Condition Table Creation with key combination of the added field.
    Appreciate your prompt response on this.*
    Rgds,

    Hi Ravi,
    Please check the following thread;
    Re: Pricing - Adding new field to pricing catalog
    also the following link
    http://www.sap-img.com/sap-sd/how-to-create-field-in-komp-komp.htm
    Hope this will help
    Regards
    Chandra

  • ERROR in the structure KOMP (Pricing communication item)

    Hello All,
    While doing any transaction in the IDES server. Its giving me an run time error.
    That
    Runtime Errors         DDIC_TYPE_INCONSISTENCY
    Date and Time          24.07.2009 12:40:09
                                                                                    ShrtText
    Inconsistency in the Dictionary for the structure "KOMP".
    System information - SAPERP central component 5.0
    Kernel release 640, patch level 229.
    SAP Gui release 710.
    Please help me
    high priority.
    Abhinay Waikar...

    Thanks you for quicj reply,
    but i been there in Se11 that is in active stage.
    also by checking in the structure with check ikon its giving message that
    no inconsistency found in structure.
    Abhinay Waikar

  • Is include PRODH contained in structure KOMP in release 4.6A?

    Is include PRODH contained in structure KOMP in release 4.6A?
    I don't mean field PRODH, but namely .INCLUDE PRODH.
    Maybe smbd has an access in 4.6A, please help.
    P.S. namely version 4.6A (not 4.6B or 4.6C) required.
    TIA, regards, Nikolai.

    Hi,
    Not sure whether your problem is solved. anyway, i had the same problem and it is solved.
    what i did is, go to se11 -> 'PLPO_DI'<your structure name> -> display -> Utilities->Runtime Object -> Check. this will check the object consistency. Then try to re-activate your structure and reactivate your program as well.
    This worked for my program, hope it helps.

  • Version differences were generated in structure KOMP.

    Our company is going to upgrade ECC 6.0 version.
    So I tried to test in 6.0 test system.
    When I executed in SPDD T-CODE, I compared with prior 4.7 version
    system.
    I found that KOMP strucure is differ from 4.7 system version.
    So errr is generated because version was not same.
    I wish to adjust difference with 4.7 system version .
    Answer me how version differences were not generated.

    Hey,
    I think it was added in 4.6B version.You can do one thing.
    Go to SE11>KOMP table->system->status>Component version->one search icon is there,click that.
    There you can find out whatever modifications are done with the table.
    Shout me again if any other clarification is required.
    And also don't forget to reward points
    Thanks.

  • Inconsistency in structure u0093KOMPu0094 - what caused this?

    Hi All,
    We had a problem where all users experienced an ABAP Dump 'DDIC_TYPE_INCONSISTENCY' when running transaction codes such as FB50.
    To solve the problem SAP sent the following instructions:
    “The problem is due to Inconsistency in the Dictionary for the structure
    KOMP. If you go to TCode SE11 : KOMP > Display : Utilities > Runtime
    Object > Check -> Active runtime object for KOMP is inconsistent.
    To solve this error, please activate the structure KOMP manually by
    going to tcode SE11 : enter KOMP > Display : Structure – Activate”
    I have asked SAP what exactly caused this problem and they mentioned that a user had changed underlying structure of KOMP named KOMPAKE.
    Tcode SE11 is locked in Production to prevent stuff like this from happening and the only tcode the users ran before we experienced the first dump is KE30.
    SAP insists that KE30 could not have changed structure.  And the only changes made in production were transports imported 5 days before we experienced this problem.
    Would anyone have ideas on how I can determine what caused this problem?
    I would appreciate any help.
    Thanks,
    Kevin

    I looked at the version management for this structure KOMPAKE and the only entry I see is from the same user ID with a data/time stamp right before we experienced the first ABAP Dump, and the entry in the version managements starts like this:
    Version(s) in the development database:
      activ          X  640               
    I also noticed the same structure KOMPAKE changed in our QA environment by a user that was testing KE30 a day after we had this problem in Production.
    So maybe KOMPAKE was auto-generated by KE30 and somehow failed before it could complete, leaving it in an inactive state?
    But if that is the case why were there no problems before, can a structure be auto-generated if its already active?
    I also found this System log in SM21 where it shows the first ABAP Dump and the errors before it:
                                                                                    Time     Ty. Nr  Cl. User         Tcod MNo Text                                               
    19:06:14 DP                            Q0I Operating system call recv failed (error no. 232 )           
    19:06:14 DP                            Q04 Connection to user 10524 (User1 ), terminal 68 (PCComputer ) lost
    19:06:24 DIA 000 100 User1        KE30 R2C Terminal 00068 in status DISC                                
    19:06:24 DIA 000 100 User1        KE30 R68 Perform rollback                                             
    19:06:24 DIA 000 100 User1        KE30 R47 Delete session 001 after error 004                           
    19:06:24 DP                            Q0G Request (type DIA) cannot be processed                       
    19:07:26 DIA 000 000 SAPSYS            R68 Perform rollback                                             
    19:07:27 DIA 000 000 SAPSYS            AB0 Run-time error "DDIC_TYPE_INCONSISTENCY" occurred            
    19:07:27 DIA 000 000 SAPSYS            AB1 > Short dump "070327 190727 hsapecp1 SAPSYS " generated
    Message was edited by:
            Kevin Elias
    Message was edited by:
            Kevin Elias

  • Enquiry about transporting the structure

    Hi,
    I added the new fields in the structure Komp .
    Is there any way to transport the structure komp which is in IDES to
    DEVELOPMENT SERVER.
    Pooja

    Hi Pooja ,
    yeah u can do it , but this is purely BASIS job.
    first u have to create transport request for  this changes in IDES , then u have to get the Cofile and data file of this Transport Request , then these files u have to IMPORT to ur DEV server .
    which can be done thru FTP , so dont try if u are not sure.
    Regards
    Prabhu

  • Short dump during ME23N transaction due to missing field in KOMP table

    Hi All,
    We have just upgraded to Business Suite 7.0 and are experiencing the following error:
    Short dump during processing of transaction ME23N - error is in program SAPLV61A when the system calls the following field: KOMP_SERVICE_PARAM2 (this does not exist in KOMP). We need to get this resolved as soon as possible, It appears that SAP have removed this field from the table KOMP but the standard programme is still looking for this field. Can anyone provide an oss note number or insight into how to resolve this issue please.
    Many Thanks
    Amanda

    Dear,
    This problem is caused by a missing initialization of the structure KOMP in the program SAPLV61A.
    The problem may also occur during , when the "Create PO automatically" indicator (TVAP-ALEKZ) is set for the relevant item category in the item category Customizing (transaction VOV7). In this case, the data of the purchase order item that was previously processed is used for the back update of the sales order from the purchase order in KOMP.
    Add the following import parameter to the function module RV_KONV_SELECT:
        Parameter name        COMM_ITEM_I
        Typing          LIKE
        Associated type            KOMP
        Optional        X
        Pass Value       X
    Please refer the OSS note 1261566.
    Regards,
    R.Brahmankar

  • Communication Structures

    Hey folks,
    I do have some basic doubts on Pricing & Pricing communication structure. These may sound really stupid to some.. But, please ..Please reply if you know the answer..it will help me a lot...
    1. What is a Communication Structure??
    Lets say - Pricing Communication Structure - KOMP / KOMK.. - I know KOMK is a header Pricing Communication Structure & KOMP for item...
    But, precisely what it is the communication structure doing ??
    2. If KOMP is for Item; KOMK - for header. Then what is KOMG. What role does structure KOMG play?
    3. If we KOMP / KOMK for item & header respectively - then what for are communication structures - KOMPAZ & KOMKAZ
    4. What is the difference between KOMK & XKOMK or KOMP & XKOMP..
    I mean I really don't know why I see xKOMP in some condition routines..
    5. What is XKWERT & KWERT ??
    Any documentation on this will be really helpful to me.
    Thanks,
    Lavanya

    Hi Lavanya - Routines are executed/called during condition type processing from a document. Since, condition type processing happens either during the creation of a particular document (like pricing) or after the document has been saved (like output conditions), data required for processing these condition types are sent through communication structures instead of allowing condition types to access table data directly. Think of this situation, a sales order is in the process of being created and pricing happens before even saving the document. Now if the processing of conditions were to be done using direct table read, how would it fetch data for an order that is still in process of being created... I hope you'r getting the point. Hence, (I believe thats what forced) SAP to design condition type processing using communication structures that would be filled with data before the conditions would be processed.
    Like for instance, pricing. The communication structures, as you know it, KOMK and KOMP would be supplied before a condition type is processed. Similarly, for output condition type processing, communication routines are KOMxByy, where x can be K- Header, P-item level and yy is the application (v1, v2 ). So a sales order output condition type will have these two communication structures for processing, KOMKBV1 and KOMPBV1.....
    You can view the structures and see for yourself the desired field before setting up a condition type. On occasions where you don't find a particular information field in the structure and you think thats required for your condition processing, you would have to enhance these structures. Before that, make sure that the information you are seeking from this new field in the structure can be sourced from the underlying document. For instance, sales order, you need a information out from the order but you don't have a corresponding field in the structure. You would first define the field in the structure (use the standard includes). Then go and have an ABAPer code in the user exit MV45AFZZ (userexit_pricing_prepare) to move the required data to this new field.
    Hope you would have got the basic processing style used in SAP for processing condition types, both at pricing and output condition types.
    Rgds,
    Naren

  • Vendor Based Tax in Sales Order

    Dear Friends,
    I would like to Have Vendor basis Tax in Sales Order and I Have done all sort of Configuration but vendor number is not reading in sales order and same can be seen through Analysis tab and error is Vendor field is not initialized. 
    Vendor is been Populated in Sales order header and Item Level from Customer Master.
    Vendor Field has in Pricing field catalog.
    Table has been created with Vendor Field
    Same has been assign to Access Sequence.
    to Access Sequence has been assigned to Condition Type.
    Condition Type has been Maintained in Pricing Procedure.
    Condition Record has been created for Tax Condition Type Which has Vendor Field.
    Vendor Master data is exists and same has been created by MM Guys.
    Many of posts are saying that Vendor to be added to Pricing Communication Structure KOMP, KOMK, KOMG,KOMV. but My Abaper is Poor so request you to guide me what exactly Abaer has to do and What Code to be entered in User Exists SAPMV45AFZZ and RV60AFZZ if not any other suggested user exists.
    It would be really appreciated from bottom of the heart  if any once can mail be the guidance literature to my mail id Text Removed
    Warm Regards
    Vijay
    Edited by: Lakshmipathi on Dec 14, 2011 8:10 PM
    Please dont ask any information to share to your personal mail id which is against the forum rules

    Hi
    If you want to enhance the communication pricing for taxes, see SAP Note 531835 - Using field PSTYV in the condition access.
    In the other hand, see the article [R/3 Tax Interface Configuration Guide|http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/047ab790-0201-0010-a9b1-e612f8b71dcd?QuickLink=index&overridelayout=true] in this site.
    Regards
    Eduardo

  • Sap script doubt

    hi all,
    i have problem with the print program.in this it is printing the from in pre printed format.
    but as comapny's pre printed format has been changed so
    they are not willing to carry it on.
    so they have given me a format to design the form .
    i have designed the form and assined my from name in the
    print program but i was not able to see output ie my form
    which i have designed.
    my form name is zinv.
    so for this i am sending my print prog so what changes i have to make in it so that i can see my form after executing it.
    plz give me the solution.
    REPORT ZSI-01 LINE-SIZE 132.
    PROGRAM NAME : ZINVOICE                    AUTHOR       : SATYA      *
    START DATE   : 11-04-98                    END DATE     :            *
    REQUEST NO   :                             REQUESTED BY : SELVAM     *
    CHANGE DATE  : 12.05.98                    CHANGED BY   :            *
    OBJECTIVE    :INVOICE PRINTING ON LAYOUT SET.                        *
                  LAYOUT SET ZINVOICE                                    *
                  PF-STATUS 100.                                         *
    changed and transfered on 16.04.99 REQUESTED BY SELVAM.              *
    THIS IS THE LATEST VERSION OF INVOICE PROG CHANGES MADE BY raghu     *
               ON 16/04/99                                               *
      RECENT COPY WITH  SECOND SALES & TAX EMPTED REQ SELVAM 24/6/98     *
      copy with form sale req by selvam 27/07/98                         *
    PRINT-CONTROL FUNCTION 'CI015'.
    *TRANSPARETN TABLES
    TABLES : KOMK.
    TABLES : KOMV.
    TABLES : KOMP.
    TABLES : KNVK.
    TABLES : OBJK.
    TABLES : SER01.
    TABLES : T001W.
    TABLES : MKPF.
    TABLES : KONV .
    TABLES : LIKP.
    TABLES : VBFA .                                             "
    TABLES : VBAK .     "Header table for the invoice document
    TABLES : VBAP .     "Line item table for the invoice document
    TABLES : KNA1 .     "Customer master table for the customer details
    TABLES : MARA .                        "Material master table
    TABLES : ITCPO.     "SYSTEM TABLE FOR LAYOUT SETS COMMUNICATION
    TABLES : ITCPP.     "SYSTEM TABLE FOR LAYOUT SETS COMMUNICATION
    TABLES : VBRK.      "HEADER TABLE FOR BILLING DOCUMENT
    TABLES : VBRP.                         "LINE ITEM FOR BILLING DOCUMENT
    TABLES : VBPA.                         "PARTNER FOR SALES DOCUMENT
    TABLES : KNB1.
    TABLES : LIPS.
    TABLES : TVM1T.
    TABLES : SADR.
    *INTERNAL TABLES
    DATA : BEGIN OF INV_TAB OCCURS 0.
    DATA : BILLNO LIKE VBRP-VBELN.
    DATA : END OF INV_TAB.
    DATA : BEGIN OF I_TAB OCCURS 0.
    DATA : SDNO LIKE LIKP-VBELN.
    DATA : INVO LIKE VBRK-VBELN.
    DATA : ORNO LIKE VBAK-VBELN.
    DATA : END OF I_TAB.
    *FOR READ PRICE
    DATA: BEGIN OF TKOMV OCCURS 0.
            INCLUDE STRUCTURE KOMV.
    DATA: END OF TKOMV.
    DATA: BEGIN OF TKOMVD OCCURS 0.
            INCLUDE STRUCTURE KOMVD.
    DATA: END OF TKOMVD.
    DATA : BEGIN OF CTYPE OCCURS 0.
    DATA :SIGN(1).
    DATA :OPTIONS(2).
    DATA :LOW(4).
    DATA :HIGH(4).
    DATA : END OF CTYPE.
    *header data
    DATA : BEGIN OF HEAD_TAB.
    DATA : DOCNO LIKE VBRK-VBELN.
    DATA : SALOF LIKE VBRK-VKORG.
    DATA : DOCDT LIKE VBRK-FKDAT.
    DATA : PLANT LIKE LIKP-WERKS.
    DATA : PNAM1 LIKE T001W-NAME1.
    DATA : PNAM2 LIKE T001W-NAME2.
    DATA : PNAM3 LIKE T001W-NAME1.
    DATA : PNAM4 LIKE T001W-NAME2.
    DATA : PNAM5 LIKE T001W-PSTLZ.
    DATA : PCSTNO(35).
    DATA : PLSTNO(35).
    *DATA : POREF LIKE VBAK-BSTNK.
    DATA : POREF(30).
    DATA : PODAT LIKE VBAK-BSTDK.
    DATA : CCODE LIKE KNA1-KUNNR.
    DATA : CPERSON LIKE KNVK-NAME1.
    DATA : TPHONE LIKE VBPA-PARNR.
    DATA : SALESOR LIKE VBAK-AUFNR.
    DATA : BILLCUR LIKE VBAK-WAERK.
    DATA : CARNAME(35).
    DATA : SPSHIPI(40).
    DATA : SPCARIN(40).
    DATA : LRNO(20).
    DATA : LRDT(20).
    DATA : MODEPAY(20).
    DATA : CSTNO(30).
    DATA : LSTNO(30).
    DATA : STAMT TYPE P DECIMALS 2.        "SUB TOTAL
    DATA : STAXAMT TYPE P DECIMALS 2.      "SALES TAX AMOUNT
    DATA : FCHRG TYPE P DECIMALS 2.
    DATA : OCHRG LIKE VBRP-NETWR.
    DATA : AMOUNTINWORDS(150).
    DATA : GTOTAL TYPE P DECIMALS 2.
    DATA : FROMDATE(10).
    DATA : ENDDATE(10).
    DATA : END OF HEAD_TAB.
    DATA : B_PRNCTR TYPE I VALUE 0 .
    *sold to party
    DATA : BEGIN OF SOLDP_TAB.
    DATA : NAME LIKE KNA1-NAME1.
    DATA : ADD1 LIKE KNA1-NAME2.
    DATA : ADD2 LIKE KNA1-NAME3.
    DATA : ADD3 LIKE KNA1-ORT01.
    DATA : ADD4 LIKE KNA1-PSTLZ.
    DATA : ADD5 LIKE KNA1-REGIO.
    DATA : ADD6 LIKE KNA1-NAME4.
    DATA : END OF SOLDP_TAB.
    DATA : B_SURCHARG VALUE 'N'.
    ship to party
    DATA : BEGIN OF SHIPP_TAB.
    DATA : NAME LIKE KNA1-NAME1.
    DATA : ADD1 LIKE KNA1-NAME2.
    DATA : ADD2 LIKE KNA1-NAME3.
    DATA : ADD3 LIKE KNA1-ORT01.
    DATA : ADD4 LIKE KNA1-PSTLZ.
    DATA : ADD5 LIKE KNA1-REGIO.
    DATA : ADD6 LIKE KNA1-NAME4.
    DATA : END OF SHIPP_TAB.
    LINE ITEMS
    DATA : BEGIN OF LINE_TAB OCCURS 0.
    DATA : B_LONO(4).
    DATA : CFAMOUNT LIKE VBRK-NETWR.
    DATA : SLNO(4).
    DATA : PRODCODE(6).
    DATA : SERNO(20).
    DATA : DESC(40).
    DATA : UOM(4).
    DATA : QTY(5).
    DATA : RATE TYPE P DECIMALS 2.
    DATA : AMOUNT TYPE P DECIMALS 2.
    DATA : STAX(5).
    DATA : OTAX(5).
    DATA : B_TAXAMOUNT_LINE LIKE VBRP-NETWR.
    DATA : POSNR LIKE VBRP-POSNR .         "     ADDED BY ANIL
    DATA : END OF LINE_TAB.
    *serial Nos
    DATA : BEGIN OF SER_TAB OCCURS 0.
    DATA : SERNO(20).
    DATA : SLNO(4).
    DATA : END OF SER_TAB.
    *structure for carried forward.
    DATA : BEGIN OF SUBTOT.
    DATA : B_SUBTOTAL LIKE VBRK-NETWR.
    DATA : END OF SUBTOT.
    *STRUCTURE for layout set
    DATA : BEGIN OF SERALIGN.
    DATA : TEXT(10).
    DATA : B_SL1 LIKE SER_TAB-SERNO.
    DATA : B_SL2 LIKE SER_TAB-SERNO.
    DATA : B_SL3 LIKE SER_TAB-SERNO.
    DATA : END OF SERALIGN.
    *VARIABLES
    DATA : B_DIVIDE LIKE VBRP-NETWR.
    DATA : B_PRNUCOMM LIKE SY-UCOMM.
    DATA : B_NEWPAGE.
    DATA : B_INVRATE LIKE VBRP-NETWR.
    DATA : B_INVSTAX LIKE VBRP-NETWR.
    DATA : B_TAX(4),B_TOT(4).
    DATA : B_DIFFCOUNT TYPE I.
    DATA : B_COUNTOFRECORDS TYPE I.
    DATA : B_TOTALINDICATOR(256).
    DATA : B_TEMP(25).
    DATA : B_TEMP1(25).
    DATA : B_AMOUNTSTRING1(36).
    DATA : B_AMOUNTSTRING2(35).
    DATA : B_AMOUNTSTRING3(35).
    DATA : B_ORDERREFNO LIKE VBRK-XBLNR.
    DATA : B_RATEFORITEM LIKE VBRK-NETWR.
    DATA : B_TOTALAMOUNT TYPE P DECIMALS 2 VALUE 0.  "TOTAL INVOICE AMOUNT
    DATA : B_CUSTOMERNO LIKE VBAK-KUNNR.   "CUSTOMER NO FROM VBAK TABLE
    DATA : B_RECORDCOUNTER TYPE I.         "RECORD COUNTER
    DATA : B_AMOUNTINWORDS(200).           "AMOUNT STORED IN WORDS
    DATA : B_DECIMALAMOUNTINWORDS(40).     "DEC PART OF THE AMOUNT WORD
    DATA : B_AMOUNTINWORDSFINAL(256).      "TOTAL AMOUNT IN WORDS
    DATA : B_CUSTOMERCODE LIKE VBAK-KUNNR. "CUSTOMER CODE
    DATA : B_STRINGLENGTH TYPE I.
    DATA : B_INVFORCHARGE LIKE VBRP-NETWR.
    DATA : B_INVOCTROI LIKE VBRP-NETWR.
    DATA : B_INVTOT LIKE VBRP-NETWR.
    DATA : B_INVNO LIKE VBAK-VBELN.
    DATA : B_RECCOUNT TYPE I VALUE 0 , START TYPE I VALUE 0.
    DATA : IFSELECTED TYPE C VALUE 'X'.
    DATA : B_TOTAL_TAX LIKE VBRK-NETWR.
    DATA : B_IFSERVICEORDER(1) VALUE 'T'.
    DATA : ANS(1).
    DATA : B_SHIP_TO_PARTY LIKE KNA1-KUNNR.
    DATA : B_SOLDTOPARTYCODE LIKE KNA1-KUNNR.
    DATA  B_STR(35).
    DATA : RECNO LIKE SY-INDEX VALUE 1.
    DATA : B_SPCFLAG VALUE 'F'.
    DATA : B_TAX_INFO1(80) .
    DATA : B_SECOND_SALE(250) .
    DATA : B_EXEMPTED(250) .
    DATA : B_HEXEMPTED(250) .
    DATA : B_TAX_STR(250).
    DATA : B_FORM_TEXT(250) .
    DATA : B_FORM_TYPE(25) .
    DATA : TXT(60).
    DATA : BEGIN OF FORM_TAB OCCURS 0 ,
           MVGR1 LIKE VBRP-MVGR1 ,
           SLNO(5) ,
           END OF FORM_TAB .
    DATA : OLD_MVGR1 LIKE TVM1T-MVGR1 , B_FORM_IND LIKE SY-TABIX .
    DATA : B_TAX_LEN TYPE I .
    DATA : FKART LIKE VBRK-FKART.
    SET PF-STATUS '100'.
    SELECTION-SCREEN BEGIN OF BLOCK B_1 WITH FRAME TITLE TEXT-001.
    SELECT-OPTIONS SEL1 FOR VBRK-VBELN MATCHCODE OBJECT VMCF MEMORY ID VF.
    SELECT-OPTIONS SEL2 FOR LIKP-VBELN MATCHCODE OBJECT VMVL MEMORY ID VL.
    SELECT-OPTIONS SEL4 FOR VBAK-KUNNR MEMORY ID VAG.
    SELECTION-SCREEN END OF BLOCK B_1.
    SELECTION-SCREEN BEGIN OF BLOCK B_2 WITH FRAME TITLE TEXT-005.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(3) TEXT-002.
    PARAMETERS : PRINTSL RADIOBUTTON GROUP GRP1.
    SELECTION-SCREEN COMMENT 7(2) TEXT-003.
    PARAMETERS : NPRINTSL RADIOBUTTON GROUP GRP1.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK B_2.
    PERFORM INIT.
    CLEAR HEAD_TAB.
    IF SEL2 EQ SPACE AND SEL1 EQ SPACE.
      IF SEL4 EQ SPACE.
        PERFORM WIN_INFO(ZURL) USING 'Error' 'Enter atleast one' 'Value'.
        EXIT.
      ENDIF.
    ENDIF.
    PERFORM WRITEITEMS.                    "Selection Screen
          FORM MAIN                                                     *
    FORM MAIN.
      B_PRNCTR = 0 .
      LOOP AT I_TAB.
        CLEAR : B_SECOND_SALE , B_EXEMPTED , B_TAX_LEN .
       read table i_tab index recno.
        PERFORM SOLD_TO_PARTY_CHANGE USING I_TAB-INVO.
       if sy-subrc eq 0.
        B_INVNO = I_TAB-SDNO.
        PERFORM FILL_CHAR(ZURL) USING 10 '0' I_TAB-SDNO CHANGING B_INVNO.
        PERFORM FILL_CHAR(ZURL) USING 10 '0' I_TAB-INVO
                                CHANGING I_TAB-INVO.
        CLEAR HEAD_TAB-GTOTAL.
        PERFORM ASSIGN.
         perform alignwrite.
        PERFORM OPENFORM USING 'ZINVOICEDUMMY'.
        PERFORM LAYOUTSETWRITE.
        DATA : B_SRLNO(4) VALUE 0.
        DATA : B_CTR TYPE I VALUE 0.
        DATA : B_LOOPCTR TYPE I VALUE 0.
        DATA : B_AMT1 LIKE VBRK-NETWR.
        DATA : B_TEXTELEMENT(3).
        SUBTOT-B_SUBTOTAL = 0.
        B_SRLNO = 0.
        LOOP AT LINE_TAB.
          ADD 1 TO B_SRLNO.
          MOVE B_SRLNO TO LINE_TAB-B_LONO.
          PERFORM TAX_INFO_DETERMINE USING B_SRLNO.
                                                   "  ADDED BY ANIL
          SUBTOT-B_SUBTOTAL = B_AMT1 + LINE_TAB-AMOUNT.
          "add line_tab-amount to subtot-b_subtotal.
          MOVE SUBTOT-B_SUBTOTAL TO B_AMT1.
          PERFORM LAYOUTSETMAIN USING '100'.
          MOVE '101' TO B_TEXTELEMENT.
          IF PRINTSL EQ 'X'.
            MOVE 'Serial No:' TO SERALIGN-TEXT.
            LOOP AT SER_TAB WHERE SLNO EQ LINE_TAB-SLNO.
              IF B_LOOPCTR EQ B_CTR.
                MOVE SER_TAB-SERNO TO SERALIGN-B_SL1.
                ADD 1 TO B_CTR.
                PERFORM LAYOUTSETMAIN USING B_TEXTELEMENT.
              ENDIF.
              IF B_LOOPCTR EQ B_CTR.
                MOVE SER_TAB-SERNO TO SERALIGN-B_SL2.
                ADD 1 TO B_CTR.
                PERFORM LAYOUTSETMAIN USING B_TEXTELEMENT.
              ENDIF.
              IF B_LOOPCTR EQ B_CTR.
                MOVE SER_TAB-SERNO TO SERALIGN-B_SL3.
                ADD 1 TO B_CTR.
                PERFORM LAYOUTSETMAIN USING B_TEXTELEMENT.
              ENDIF.
              B_LOOPCTR = B_LOOPCTR + 1.
              MOVE '103' TO B_TEXTELEMENT.
              MOVE ' ' TO SERALIGN-TEXT.
            ENDLOOP.
          ENDIF.
        ENDLOOP.
        HEAD_TAB-GTOTAL = B_INVRATE + B_INVSTAX + B_INVTOT +
                          B_INVOCTROI + B_INVFORCHARGE.
        HEAD_TAB-OCHRG = B_INVTOT.
        IF HEAD_TAB-PLANT EQ '0020'.
          PERFORM LAYOUTSETMAIN USING '104'.
        ENDIF.
        IF B_SURCHARG = 'Y'.
          PERFORM LAYOUTSETMAIN USING '105'.
        ENDIF.
        DESCRIBE TABLE FORM_TAB LINES SY-TABIX .
        IF SY-TABIX > 0 .
          SORT FORM_TAB BY MVGR1 .
          CLEAR : OLD_MVGR1 , B_FORM_IND .
          LOOP AT FORM_TAB .
            IF FORM_TAB-MVGR1 <> OLD_MVGR1 AND B_FORM_IND > 1 .
              SELECT SINGLE * FROM TVM1T WHERE MVGR1 = OLD_MVGR1 .
              CONCATENATE '. :' TVM1T-BEZEI INTO B_FORM_TYPE
                                   SEPARATED BY SPACE .
              PERFORM PRINT_TAX_INFO USING B_FORM_TEXT B_FORM_TYPE .
              CLEAR B_FORM_TEXT .
            ENDIF .
            ADD 1 TO B_FORM_IND .
            OLD_MVGR1 = FORM_TAB-MVGR1 .
            CONCATENATE B_FORM_TEXT ',' FORM_TAB-SLNO INTO B_FORM_TEXT
                          SEPARATED BY SPACE .
          ENDLOOP .
          SELECT SINGLE * FROM TVM1T WHERE MVGR1 = OLD_MVGR1 .
          CONCATENATE '. :' TVM1T-BEZEI INTO B_FORM_TYPE
                               SEPARATED BY SPACE .
          PERFORM PRINT_TAX_INFO USING B_FORM_TEXT B_FORM_TYPE .
          CLEAR B_FORM_TEXT .
        ENDIF .
        PERFORM LAYOUTSETMAIN USING '109'.
        B_TAX_LEN = STRLEN( B_SECOND_SALE ) .
        IF B_TAX_LEN > 0 .
          PERFORM PRINT_TAX_INFO USING B_SECOND_SALE
                                        '. : Second Sales - No Tax' .
        ENDIF .
        B_TAX_LEN = STRLEN( B_EXEMPTED ) .
        IF B_TAX_LEN > 0 .
          PERFORM PRINT_TAX_INFO USING B_EXEMPTED
                                 '. : Software Exempted From Tax' .
        ENDIF .
        B_TAX_LEN = STRLEN( B_HEXEMPTED ) .
        IF B_TAX_LEN > 0 .
          PERFORM PRINT_TAX_INFO USING B_HEXEMPTED
                                 '. : Exempted From Tax' .
        ENDIF .
        MOVE 'Sales Tax Shown is inclusive of surcharge @ 10%'
              TO B_TAX_STR.
        REFRESH : FORM_TAB .
        CLEAR : B_SECOND_SALE , B_EXEMPTED , B_TAX_LEN ,B_FORM_TEXT,
                FORM_TAB , B_HEXEMPTED .
        PERFORM CONVERT.
        PERFORM LAYOUTFOOTER USING '102'.
        PERFORM CLOSEFORM(ZURL).
        PERFORM INIT.
      endif.
      ENDLOOP.
    ENDFORM.
          FORM ASSIGN                                                   *
    FORM ASSIGN.
      B_INVSTAX = 0.
      B_INVRATE = 0.
      REFRESH SER_TAB.
    perform gettax using i_tab-invo.
      HEAD_TAB-DOCNO = I_TAB-INVO.
      SELECT SINGLE * FROM VBRK WHERE VBELN EQ HEAD_TAB-DOCNO.
      HEAD_TAB-DOCDT = VBRK-FKDAT.
      FKART  = VBRK-FKART.
      CLEAR HEAD_TAB-SALESOR.
      SELECT SINGLE * FROM VBAK WHERE VBELN = I_TAB-ORNO.
      MOVE VBAK-VKBUR TO HEAD_TAB-SALOF.
      MOVE VBAK-BSTNK TO HEAD_TAB-POREF.
      MOVE VBAK-BSTDK TO HEAD_TAB-PODAT.
      MOVE HEAD_TAB-PODAT TO B_STR.
      CONCATENATE B_STR6(2) '.' B_STR4(2) '.' B_STR+2(2) INTO B_STR.
      CONCATENATE HEAD_TAB-POREF '/' B_STR INTO B_STR.
      MOVE B_STR TO HEAD_TAB-POREF.
      SELECT SINGLE * FROM VBPA WHERE VBELN EQ I_TAB-INVO AND PARVW EQ 'RE'.
      IF B_SPCFLAG EQ 'T'.
        SELECT SINGLE * FROM KNA1 WHERE KUNNR EQ B_SOLDTOPARTYCODE.
        SELECT SINGLE * FROM KNB1 WHERE KUNNR EQ B_SOLDTOPARTYCODE.
        SELECT SINGLE * FROM KNVK WHERE KUNNR EQ B_SOLDTOPARTYCODE.
             move knvk-name1 to head_tab-cperson.
             move knvk-telf1 to head_tab-tphone.
        MOVE KNA1-NAME1 TO SOLDP_TAB-NAME. "SOLD TO PARTY
        MOVE KNA1-NAME2 TO SOLDP_TAB-ADD1. "SOLD TO PARTY
        MOVE KNA1-NAME3 TO SOLDP_TAB-ADD2. "SOLD TO PARTY
        MOVE KNA1-NAME4 TO SOLDP_TAB-ADD6. "added By deepak 26/11/98
        MOVE KNA1-ORT01 TO SOLDP_TAB-ADD3. "SOLD TO PARTY
        MOVE KNA1-PSTLZ TO SOLDP_TAB-ADD4. "SOLD TO PARTY
        MOVE KNA1-REGIO TO SOLDP_TAB-ADD5. "SOLD TO PARTY
      ELSE.
        SELECT SINGLE * FROM KNB1 WHERE KUNNR EQ VBPA-KUNNR.
        IF VBPA-ADRNR EQ SPACE.
          SELECT SINGLE * FROM KNA1 WHERE KUNNR EQ VBPA-KUNNR.
          MOVE KNA1-NAME1 TO SOLDP_TAB-NAME.   "SOLD TO PARTY
          MOVE KNA1-NAME2 TO SOLDP_TAB-ADD1.   "SOLD TO PARTY
          MOVE KNA1-NAME3 TO SOLDP_TAB-ADD2.   "SOLD TO PARTY
          MOVE KNA1-NAME4 TO SOLDP_TAB-ADD6.  "added By deepak 26/11/98
          MOVE KNA1-ORT01 TO SOLDP_TAB-ADD3.   "SOLD TO PARTY
          MOVE KNA1-PSTLZ TO SOLDP_TAB-ADD4.   "SOLD TO PARTY
          MOVE KNA1-REGIO TO SOLDP_TAB-ADD5.   "SOLD TO PARTY
        ELSE.
          SELECT SINGLE * FROM SADR WHERE ADRNR EQ VBPA-ADRNR.
          MOVE SADR-NAME1 TO SOLDP_TAB-NAME.   "SOLD TO PARTY
          MOVE SADR-NAME2 TO SOLDP_TAB-ADD1.   "SOLD TO PARTY
          MOVE SADR-NAME3 TO SOLDP_TAB-ADD2.   "SOLD TO PARTY
          MOVE SADR-NAME4 TO SOLDP_TAB-ADD6.
          MOVE SADR-ORT01 TO SOLDP_TAB-ADD3.   "SOLD TO PARTY
          MOVE SADR-PSTLZ TO SOLDP_TAB-ADD4.   "SOLD TO PARTY
          MOVE SADR-REGIO TO SOLDP_TAB-ADD5.   "SOLD TO PARTY
        ENDIF.
      ENDIF.
    insereted by anil on request by raghu 4/7/98
         select single * from knvk where kunnr eq vbpa-kunnr.
      CLEAR VBPA .
      SELECT * FROM VBPA WHERE VBELN EQ VBAK-VBELN AND PARVW = 'AP' AND
        ( PARNR NE SPACE OR ADRNR NE SPACE ) .
        IF  NOT VBPA-ADRNR IS INITIAL .
          SELECT SINGLE * FROM SADR WHERE ADRNR = VBPA-ADRNR .
          MOVE SADR-NAME3 TO HEAD_TAB-CPERSON.
          MOVE SADR-TELF1 TO HEAD_TAB-TPHONE.
        ELSE .
          SELECT SINGLE * FROM KNVK WHERE PARNR = VBPA-PARNR .
          MOVE KNVK-NAME1 TO HEAD_TAB-CPERSON.
          MOVE KNVK-TELF1 TO HEAD_TAB-TPHONE.
        ENDIF .
        EXIT .
      ENDSELECT .
      MOVE VBAK-VKBUR TO HEAD_TAB-SALOF.
      MOVE VBAK-VBELN TO HEAD_TAB-SALESOR.
      MOVE VBAK-WAERK TO HEAD_TAB-BILLCUR.
      MOVE KNA1-KUNNR TO HEAD_TAB-CCODE.
    END OF INSERTION
      SELECT SINGLE * FROM VBPA WHERE VBELN EQ I_TAB-INVO AND PARVW EQ 'WE'.
      IF VBPA-ADRNR EQ SPACE.
        SELECT SINGLE * FROM KNA1 WHERE KUNNR EQ VBPA-KUNNR.
        MOVE KNA1-KUNNR TO B_SHIP_TO_PARTY."SHIP TO PARTY
        MOVE KNA1-NAME1 TO SHIPP_TAB-NAME. "SHIP TO PARTY
        MOVE KNA1-NAME2 TO SHIPP_TAB-ADD1. "SHIP TO PARTY
        MOVE KNA1-NAME3 TO SHIPP_TAB-ADD2. "SHIP TO PARTY
        MOVE KNA1-NAME4 TO SHIPP_TAB-ADD6. " add by deepak on 26/11/98
        MOVE KNA1-ORT01 TO SHIPP_TAB-ADD3. "SHIP TO PARTY
        MOVE KNA1-PSTLZ TO SHIPP_TAB-ADD4. "SHIP TO PARTY
        MOVE KNA1-REGIO TO SHIPP_TAB-ADD5. "SHIP TO PARTY
      ELSE.
        SELECT SINGLE * FROM SADR WHERE ADRNR EQ VBPA-ADRNR.
        move kna1-kunnr to b_ship_to_party.  "SHIP TO PARTY
        MOVE SADR-NAME1 TO SHIPP_TAB-NAME. "SHIP TO PARTY
        MOVE SADR-NAME2 TO SHIPP_TAB-ADD1. "SHIP TO PARTY
        MOVE SADR-NAME3 TO SHIPP_TAB-ADD2. "SHIP TO PARTY
        MOVE SADR-NAME4 TO SHIPP_TAB-ADD6.
        MOVE SADR-ORT01 TO SHIPP_TAB-ADD3. "SHIP TO PARTY
        MOVE SADR-PSTLZ TO SHIPP_TAB-ADD4. "SHIP TO PARTY
        MOVE SADR-REGIO TO SHIPP_TAB-ADD5. "SHIP TO PARTY
      ENDIF.
    IF B_IFSERVICEORDER EQ 'F'.
           SELECT SINGLE * FROM LIPS WHERE VBELN EQ B_INVNO.
           MOVE LIPS-WERKS TO HEAD_TAB-PLANT.
    ELSE.
      SELECT SINGLE * FROM VBRP WHERE VBELN EQ I_TAB-INVO
                                  AND FKIMG NE 0.
      MOVE VBRP-WERKS TO HEAD_TAB-PLANT.
    endif.
      SELECT SINGLE * FROM T001W WHERE WERKS EQ HEAD_TAB-PLANT.
      SELECT SINGLE * FROM SADR WHERE ADRNR EQ T001W-ADRNR.
      MOVE SADR-NAME1 TO HEAD_TAB-PNAM1.
      MOVE SADR-NAME2 TO HEAD_TAB-PNAM2.
      MOVE SADR-NAME3 TO HEAD_TAB-PNAM3.
      MOVE SADR-NAME4 TO HEAD_TAB-PNAM4.
      MOVE SADR-PSTLZ TO HEAD_TAB-PNAM5.
      PERFORM GETCST-LST USING T001W-ADRNR.
      DATA : B_AMOUNT_ITEM LIKE VBRP-NETWR .
      PERFORM GETTAXFORLINEITEMS USING I_TAB-INVO.
      B_INVOCTROI = 0.
      B_INVFORCHARGE = 0.
      B_INVTOT = 0.
      SELECT * FROM VBRP WHERE VBELN = I_TAB-INVO   "changed on 15/4
                           AND FKIMG NE 0.
        B_AMOUNT_ITEM = 0.
        MOVE VBRP-POSNR+2(4) TO LINE_TAB-SLNO.
        MOVE VBRP-POSNR TO LINE_TAB-POSNR.
        MOVE VBRP-MATNR+13(5) TO LINE_TAB-PRODCODE.
        MOVE VBRP-ARKTX TO LINE_TAB-DESC.
        SELECT SINGLE * FROM LIPS WHERE VBELN EQ B_INVNO
                                    AND VGPOS EQ VBRP-POSNR.
        SELECT SINGLE * FROM SER01 WHERE LIEF_NR EQ LIPS-VBELN
                                     AND POSNR EQ LIPS-POSNR.
        IF SY-SUBRC EQ 0.
          SELECT * FROM OBJK WHERE OBKNR EQ SER01-OBKNR.
            MOVE OBJK-SERNR TO SER_TAB-SERNO.
            MOVE VBRP-POSNR+2(4) TO SER_TAB-SLNO.
            WRITE SER_TAB-SERNO NO-ZERO TO SER_TAB-SERNO.
            CONDENSE SER_TAB-SERNO NO-GAPS.
            APPEND SER_TAB.
          ENDSELECT.
        ENDIF.
        MOVE VBRP-FKIMG TO B_TEMP.
        SPLIT B_TEMP AT '.' INTO B_TEMP1 B_TEMP.
        CONDENSE B_TEMP1 NO-GAPS.
        MOVE B_TEMP1 TO LINE_TAB-QTY.
        IF VBRP-KZWI2 GT 0.
          B_DIVIDE = VBRP-KZWI2 / VBRP-FKIMG.
          MOVE B_DIVIDE TO  LINE_TAB-RATE.
          B_DIVIDE = 0.
        ELSE.
          B_DIVIDE = VBRP-KZWI1 / VBRP-FKIMG.
          MOVE B_DIVIDE TO LINE_TAB-RATE.
          B_DIVIDE = 0.
        ENDIF.
        B_AMOUNT_ITEM = LINE_TAB-RATE * VBRP-FKIMG.
      add line_tab-rate to b_invrate.
        ADD B_AMOUNT_ITEM TO B_INVRATE.
        MOVE B_AMOUNT_ITEM TO LINE_TAB-AMOUNT.
        MOVE VBRP-VRKME TO LINE_TAB-UOM.
        B_TOTAL_TAX = 0.
       write : / 'before loop' , vbrp-posnr.
        LOOP AT TKOMV WHERE KPOSN EQ VBRP-POSNR AND KNUMV = VBRK-KNUMV.
         write : / vbrp-posnr , tkomv-kposn.
          IF TKOMV-KSCHL IN CTYPE.
            B_TOTAL_TAX = B_TOTAL_TAX +
                      ( ( ( TKOMV-KBETR * TKOMV-KAWRT ) * 100 ) / 100000 ).
           b_total_tax = b_total_tax + tkomv-kwert.
            ADD TKOMV-KWERT TO B_INVSTAX.
          ENDIF.
          IF TKOMV-KSCHL EQ 'ZOCT'.
            ADD TKOMV-KWERT TO B_INVOCTROI.
          ENDIF.
          IF TKOMV-KSCHL EQ 'ZF00' OR TKOMV-KSCHL EQ 'ZF01'.
            ADD TKOMV-KWERT TO B_INVFORCHARGE.
          ENDIF.
          IF TKOMV-KSCHL EQ 'ZIN6'.
            ADD TKOMV-KWERT TO B_INVTOT.
          ENDIF.
        ENDLOOP.
        B_SURCHARG = 'N'.
        B_TOT = 0.
        SORT TKOMV BY KSCHL.
        LOOP AT TKOMV WHERE KPOSN EQ VBRP-POSNR AND KNUMV = VBRK-KNUMV AND
                                                    KSCHL IN CTYPE.
          IF TKOMV-KSCHL = 'ZIN1' OR TKOMV-KSCHL = 'ZIN2'.
            B_TAX = TKOMV-KBETR / 10.
          ENDIF.
          IF TKOMV-KSCHL = 'ZIN3'.
            B_TAX = B_TAX + ( B_TAX * ( TKOMV-KBETR / 10 ) / 100 ).
          ENDIF.
          IF TKOMV-KSCHL = 'ZIN4'.
            B_TAX = B_TAX + ( B_TAX * ( TKOMV-KBETR / 10 ) / 100 ).
            B_SURCHARG = 'Y'.
          ENDIF.
        ENDLOOP.
        LOOP AT TKOMV WHERE KSCHL = 'ZIN6'.
          B_TOT = TKOMV-KBETR / 10.
        ENDLOOP.
        MOVE B_TOTAL_TAX TO LINE_TAB-B_TAXAMOUNT_LINE.
        " b_tax =  ( line_tab-b_taxamount_line / line_tab-amount ) * 100.
        MOVE B_TAX TO LINE_TAB-STAX .
        MOVE B_TOT TO LINE_TAB-OTAX.
    **Recently added**
        B_AMOUNT_ITEM = 0.
        B_TOTAL_TAX = 0.
        B_TAX = 0.
        B_TOT = 0.
       b_invrate = 0.
    ***till here
        APPEND LINE_TAB.
      ENDSELECT.
      PERFORM PRINTTEXT.
    ENDFORM.
    END-OF-SELECTION .
          FORM WRITEITEMS                                               *
    FORM WRITEITEMS.
      DATA : POPULATE TYPE I.
      PERFORM SELECTDATA.
      DESCRIBE TABLE INV_TAB LINES POPULATE.
      IF POPULATE NE 0.
        LOOP AT INV_TAB.
          ULINE AT 5(83).
          AT FIRST.
            WRITE : /5 '|'  ,10 '|SALES DOCUMENT NO' COLOR 3,
                    30 '|DELIVERY DOCUMENT NO' COLOR 3,
                    52 '|PAYER..      ' COLOR 3 ,
                    87 '|'.
            ULINE AT /5(83).
          ENDAT.
          SELECT * FROM VBRK WHERE VBELN EQ INV_TAB-BILLNO.
          CLEAR LIKP-VBELN.
          IF VBRK-RFBSK = 'C'.
            MOVE VBRK-VBELN TO HEAD_TAB-DOCNO.
            MOVE VBRK-FKDAT TO HEAD_TAB-DOCDT.
            SELECT * FROM VBFA WHERE VBELN EQ VBRK-VBELN.
                      "      and vbtyp_v ca 'JBGC'.
              IF  VBFA-VBTYP_V EQ 'G' OR VBFA-VBTYP_V EQ 'C'.
                B_IFSERVICEORDER = 'F'.
              ENDIF.
              IF VBFA-VBTYP_V = 'J'.
                 B_IFSERVICEORDER = 'T'.
              ENDIF.
            ENDSELECT.
            IF B_IFSERVICEORDER EQ 'T'.
              SELECT SINGLE * FROM VBFA WHERE VBELN EQ VBRK-VBELN
              AND VBTYP_V EQ 'J'.
              SELECT * FROM LIKP WHERE VBELN EQ VBFA-VBELV.
                IF SY-SUBRC NE 4.
                  SELECT SINGLE * FROM KNA1 WHERE KUNNR EQ VBRK-KUNRG.
                  IFSELECTED = 'X'.
                  WRITE : /5 '|' ,8 IFSELECTED AS CHECKBOX ,10 '|',
                          11 VBRK-VBELN ,30 '|' ,31 LIKP-VBELN ,52 '|',
                          53 KNA1-NAME1 ,87 '|', LIKP-WERKS.
                  ULINE AT /5(83).
                  B_RECCOUNT = B_RECCOUNT + 1.
                ENDIF.
              ENDSELECT.
            ELSE.
              SELECT SINGLE * FROM KNA1 WHERE KUNNR EQ VBRK-KUNRG.
              IFSELECTED = 'X'.
              WRITE : /5 '|' ,8 IFSELECTED AS CHECKBOX ,10 '|',
                      11 VBRK-VBELN ,30 '|' ,31 LIKP-VBELN ,52 '|',
                      53 KNA1-NAME1 ,87 '|', LIKP-WERKS.
              ULINE AT /5(83).
              B_RECCOUNT = B_RECCOUNT + 1.
            ENDIF.
            ELSE.
              IFSELECTED = ' '.
        CASE VBRK-RFBSK.
           WHEN 'A'.
           TXT = 'Billing document blocked for forwarding to FI'.
           WHEN 'B'.
           TXT = 'Posting document not created (account determ.error)'.
           WHEN 'D'.
           TXT = 'Billing document is not relevant for accounting'.
           WHEN 'E'.
           TXT = 'Billing document has been completed by cancellation'.
           WHEN 'F'.
           TXT = 'Posting document not created (pricing error)'.
           WHEN 'G'.
           TXT = 'Posting document not created (export data missing)'.
           WHEN 'H'.
           TXT = 'Posting using invoice list'.
           WHEN 'I'.
          TXT = 'Posting using invoice list (account determination error)'.
          WHEN 'J'.
          TXT = 'Accounting document created, accrual still incomplete'.
          ENDCASE.
              ULINE AT /5(83).
              WRITE : /5 '|' ,8 IFSELECTED  AS CHECKBOX INPUT OFF ,10 '|',
                      11 VBRK-VBELN ,30 '|' ,52 '|',
                      53 KNA1-NAME1 ,87 '|', LIKP-WERKS.
              ULINE AT /5(83).
              WRITE :/5 '|' , 8 TXT , 87 '|'.
              ULINE AT /5(83).
            ENDIF.
          ENDSELECT.
        ENDLOOP.
      ENDIF.
    ENDFORM.
    AT USER-COMMAND.
      DATA : CHECK(1).
      DATA : TOTALLINES LIKE SY-INDEX.
      START = 4.
      REFRESH LINE_TAB.
      REFRESH SER_TAB.
      B_PRNUCOMM = SY-UCOMM.
      DESCRIBE TABLE I_TAB LINES TOTALLINES.
      IF SY-UCOMM NE 'NEXT' AND SY-UCOMM NE 'LAST'.
    do b_reccount times.
        REFRESH I_TAB.
        DO.
          READ LINE START FIELD VALUE IFSELECTED INTO CHECK.
          IF SY-SUBRC EQ 0.
            IF CHECK EQ 'X'.
              READ LINE START FIELD VALUE LIKP-VBELN INTO I_TAB-SDNO.
              READ LINE START FIELD VALUE VBRK-VBELN INTO I_TAB-INVO.
           SELECT SINGLE * FROM VBFA WHERE VBELN EQ I_TAB-INVO
                                          AND VBTYP_V EQ 'C'.
            SELECT SINGLE * FROM VBRK WHERE VBELN EQ I_TAB-INVO.
              I_TAB-ORNO = VBRK-ZUONR.
              APPEND I_TAB.
              CLEAR I_TAB.
              CHECK = ' '.
            ENDIF.
            START = START + 2.
          ELSE.
            EXIT.
          ENDIF.
        ENDDO.
      ENDIF.
      DATA : B_UCOMM LIKE SY-UCOMM.
      MOVE SY-UCOMM TO B_UCOMM.
      CASE B_UCOMM.
        WHEN 'NEXT'.
          RECNO = RECNO + 1.
          IF RECNO GT TOTALLINES.
            RECNO = 1.
          ENDIF.
           read table i_tab index recno.
           perform sold_to_party_change using i_tab-invo.
          PERFORM MAIN.
        WHEN 'LAST'.
          RECNO = RECNO - 1.
          IF RECNO LT 1.
            RECNO = 1.
          ENDIF.
           read table i_tab index recno.
           perform sold_to_party_change using i_tab-invo.
          PERFORM MAIN.
        WHEN 'PRIN'.
           read table i_tab index recno.
           set pf-status '101'.
           perform sold_to_party_change using i_tab-invo.
          PRINT-CONTROL FUNCTION 'CI015'.
          PERFORM MAIN.
        WHEN 'PREV'.
          READ TABLE I_TAB INDEX RECNO.
         NEW-PAGE PRINT OFF NO-TITLE NO-HEADING LINE-SIZE 132 LINE-COUNT 65.
         set pf-status '102'.
         perform sold_to_party_change using i_tab-invo.
          PRINT-CONTROL FUNCTION 'CI015'.
          PERFORM MAIN.
        WHEN 'QUIT'.
          LEAVE SCREEN .
          EXIT.
      ENDCASE.
          FORM PRINTTEXT                                                *
    FORM PRINTTEXT.
      PERFORM READTEXT USING '0002' 'VBBK'.
      PERFORM READTEXT USING '0003' 'VBBK'.
      PERFORM READTEXT USING '0004' 'VBBK'.
      PERFORM READTEXT USING '0012' 'VBBK'.
      PERFORM READTEXT USING '0013' 'VBBK'.
      PERFORM READTEXT USING '0022' 'VBBK'.
      PERFORM READTEXT USING 'Z103' 'VBBP' .
      PERFORM READTEXT USING 'Z104' 'VBBP' .
    added by praveen as per selvam's request.
      IF FKART = 'FV'.
      PERFORM READTEXT USING 'ZIS1' 'VBBK'.
      PERFORM READTEXT USING 'ZIS2' 'VBBK'.
      ENDIF.
    ENDFORM.
          FORM READTEXT                                                 *
    -->  B_ID                                                          *
    FORM READTEXT USING B_ID B_OBJECT.
      DATA : BEGIN OF HEADER1 OCCURS 0.
              INCLUDE STRUCTURE THEAD.
      DATA : END OF HEADER1.
      DATA : BEGIN OF LINE1 OCCURS 0.
              INCLUDE STRUCTURE TLINE.
      DATA : END OF LINE1.
      DATA : B_NAME LIKE THEAD-TDNAME.
      B_NAME = I_TAB-SDNO.
      PERFORM FILL_CHAR(ZURL) USING 10 '0' I_TAB-SDNO CHANGING B_NAME.
    added by praveen to pick up from and to date for invoice.
      IF B_ID = 'ZIS1' OR B_ID = 'ZIS2'.
           B_NAME = I_TAB-INVO.
      ENDIF.
      IF B_OBJECT = 'VBBP'.
        CONCATENATE I_TAB-ORNO VBRP-POSNR INTO B_NAME.
      ENDIF.
      CALL FUNCTION 'READ_TEXT'
           EXPORTING
               ID                       = B_ID
               LANGUAGE                 = 'E'
                NAME                    = B_NAME
                OBJECT                  = B_OBJECT
            header                    = header1
       IMPORTING
               HEADER                   = HEADER1
           TABLES
                LINES                   = LINE1
           EXCEPTIONS
                ID                      = 1
                LANGUAGE                = 2
                NAME                    = 3
                NOT_FOUND               = 4
                OBJECT                  = 5
                REFERENCE_CHECK         = 6
                WRONG_ACCESS_TO_ARCHIVE = 7
                OTHERS                  = 8.
      DATA : LINE(40).
      LOOP AT LINE1.
        LINE = LINE1-TDLINE.
      ENDLOOP.
      CASE B_ID.
        WHEN '0002'.
          HEAD_TAB-CARNAME = LINE.
        WHEN '0012'.
          HEAD_TAB-SPSHIPI = LINE.
        WHEN '0013'.
          HEAD_TAB-SPCARIN = LINE.
        WHEN '0003'.
          HEAD_TAB-LRNO = LINE.
        WHEN '0004'.
          HEAD_TAB-LRDT = LINE.
        WHEN '0022'.
          HEAD_TAB-MODEPAY = LINE.
        WHEN 'Z103'.
          HEAD_TAB-CSTNO = LINE.
        WHEN 'Z104'.
          HEAD_TAB-LSTNO = LINE.
        WHEN 'ZIS1'.
          HEAD_TAB-FROMDATE = LINE.
          CONDENSE HEAD_TAB-FROMDATE NO-GAPS.
         WHEN 'ZIS2'.
          HEAD_TAB-ENDDATE = LINE.
          CONDENSE HEAD_TAB-ENDDATE NO-GAPS.
      ENDCASE.
    ENDFORM.
          FORM INIT                                                     *
    FORM INIT.
      CLEAR HEAD_TAB.
      REFRESH LINE_TAB.
      CLEAR LINE_TAB.
      REFRESH SER_TAB.
      CLEAR SER_TAB.
      B_DIFFCOUNT = 0.
      B_COUNTOFRECORDS = 0.
      B_ORDERREFNO = ' '.
      B_RATEFORITEM = ' '.
      B_TOTALAMOUNT = 0.
      B_CUSTOMERNO = ' '.
      B_RECORDCOUNTER = 0.
      B_AMOUNTINWORDS = ' '.
      B_DECIMALAMOUNTINWORDS = ' '.
      B_AMOUNTINWORDSFINAL = ' '.
      B_CUSTOMERCODE = ' '.
      B_STRINGLENGTH = 0.
      B_INVNO = ' '.
      B_RECCOUNT = 0 .
      START = 0.
      IFSELECTED = ' '.
      ANS = ' '.
    ENDFORM.
          FORM GETTAX                                                   *
    -->  INVO                                                          *
    FORM GETTAX USING INVO.
      DATA: BEGIN OF TKOMVD OCCURS 0.
              INCLUDE STRUCTURE KOMVD.
      DATA: END OF TKOMVD.
      DATA: BEGIN OF COMM_ITEM_E OCCURS 0.
              INCLUDE STRUCTURE KOMP .
      DATA: END OF COMM_ITEM_E.
      REFRESH TKOMV.
      MOVE 'I' TO CTYPE-SIGN.
      MOVE 'BT' TO CTYPE-OPTIONS.
      MOVE 'ZIN4' TO CTYPE-HIGH.
      MOVE 'ZIN1' TO CTYPE-LOW.
      APPEND CTYPE.
      SELECT SINGLE * FROM VBRK WHERE VBELN = INVO.
      MOVE-CORRESPONDING VBRK TO KOMK.
      CALL FUNCTION 'RV_PRICE_PRINT_ITEM'
           EXPORTING
                COMM_HEAD_I = KOMK
                COMM_ITEM_I = KOMP
           TABLES
                TKOMV       = TKOMV
                TKOMVD      = TKOMVD
           EXCEPTIONS
                OTHERS      = 1.
    SUB TOTAL AMOUNT
      LOOP AT TKOMV .
        IF TKOMV-KSCHL EQ 'ZSRP'.
          HEAD_TAB-STAMT = HEAD_TAB-STAMT + TKOMV-KWERT.
        ENDIF.
      ENDLOOP.
    *SALES TAX AMOUNT
    SELECT * FROM VBRP WHERE VBELN EQ INVO AND FKIMG NE 0. "changed on 15/4
        LOOP AT TKOMV WHERE KPOSN EQ VBRP-POSNR.
          IF TKOMV-KSCHL IN CTYPE.
            HEAD_TAB-STAXAMT = HEAD_TAB-STAXAMT +  TKOMV-KWERT.
          ENDIF.
        ENDLOOP.
      ENDSELECT.
    FORWARDING CHARGES
      LOOP AT TKOMV.
        IF TKOMV-KSCHL EQ 'ZF00'.
          HEAD_TAB-FCHRG = HEAD_TAB-FCHRG + TKOMV-KWERT.
        ENDIF.
        IF TKOMV-KSCHL EQ 'ZIN6'.
          HEAD_TAB-OCHRG = HEAD_TAB-OCHRG + TKOMV-KWERT.
        ENDIF.
      ENDLOOP.
    *grand total
      CLEAR HEAD_TAB-GTOTAL.
      HEAD_TAB-GTOTAL = HEAD_TAB-GTOTAL + HEAD_TAB-FCHRG.
      HEAD_TAB-GTOTAL = HEAD_TAB-GTOTAL + HEAD_TAB-STAXAMT.
      HEAD_TAB-GTOTAL = HEAD_TAB-GTOTAL + HEAD_TAB-STAMT.
      HEAD_TAB-GTOTAL = HEAD_TAB-GTOTAL + HEAD_TAB-OCHRG.
      PERFORM CONVERT.
    ENDFORM.
    *&      Form  GETCST-LST
    FORM GETCST-LST USING B_REGION.
      SELECT SINGLE * FROM SADR WHERE ADRNR EQ B_REGION.
      MOVE SADR-TELTX TO HEAD_TAB-PLSTNO.
      MOVE SADR-TELX1 TO HEAD_TAB-PCSTNO.
    ENDFORM.                               " GETCST-LST
    *&      Form  ALIGNWRITE
    FORM ALIGNWRITE.
    *set pf-status '102'.
      PERFORM HEADER.
      DATA : LINECTR TYPE I VALUE 0.
      DATA : B_RATE(12),B_AMOUNT(13).
      DATA : B_SCOUNT TYPE I VALUE 0.
      DATA B_SRLNO TYPE I VALUE 0.
      DATA : B_FLAG TYPE I VALUE 0.
      DATA : B_SUBTOTAL LIKE VBRP-NETWR VALUE 0.
      LOOP AT LINE_TAB.
        ADD 1 TO LINECTR.
        ADD 1 TO B_SRLNO.
        B_RATE = LINE_TAB-RATE.
        B_AMOUNT = LINE_TAB-AMOUNT.
        WRITE : / ' ',7(4) B_SRLNO.
        WRITE :14 LINE_TAB-PRODCODE.
        WRITE :23 LINE_TAB-DESC.
        WRITE :67(3) LINE_TAB-UOM.
        WRITE :73(5) LINE_TAB-QTY RIGHT-JUSTIFIED.
        WRITE :80(14) LINE_TAB-RATE RIGHT-JUSTIFIED.
        B_SUBTOTAL = B_SUBTOTAL + LINE_TAB-AMOUNT.
        WRITE :95(12) LINE_TAB-AMOUNT RIGHT-JUSTIFIED.
        CONDENSE LINE_TAB-STAX NO-GAPS.
        LINE_TAB-STAX =
                 ( LINE_TAB-B_TAXAMOUNT_LINE / LINE_TAB-AMOUNT ) * 100.
        WRITE :110 LINE_TAB-STAX(5).
        PERFORM IFENDOFPAGE USING LINECTR B_SUBTOTAL.
                                           " write :95 line_tab-otax.
        B_SCOUNT = 0.
        IF PRINTSL EQ 'X'.
          DESCRIBE TABLE SER_TAB LINES B_FLAG.
          IF B_FLAG NE 0.
            WRITE : / ' ',12 'Serial Nos :'.
            ADD 1 TO LINECTR.
          ENDIF.
          LOOP AT SER_TAB WHERE SLNO EQ LINE_TAB-SLNO.
            B_SCOUNT = B_SCOUNT + 1.
            WRITE : (18)SER_TAB-SERNO NO-GAP,'  '.
            IF B_SCOUNT EQ 3.
              WRITE : /23 ' '.
              ADD 1 TO LINECTR.
              B_SCOUNT = 0.
            ENDIF.
            PERFORM IFENDOFPAGE USING LINECTR B_SUBTOTAL.
          ENDLOOP.
          B_SCOUNT = 0.
        ENDIF.
      ENDLOOP.
      DATA : B_EXTRA TYPE I.
      B_EXTRA = 23 - LINECTR.
      DO B_EXTRA TIMES.
        WRITE : ' ' ,/.
      ENDDO.
      PERFORM FOOTER.
    ENDFORM.                               " ALIGNWRITE
    **form footer **
    FORM FOOTER.
      WRITE :/ ' '.
      WRITE :/ ' ',24 HEAD_TAB-BILLCUR,58 B_INVRATE,
              101 HEAD_TAB-CARNAME+0(15).
      WRITE :/58 B_INVSTAX ,79 HEAD_TAB-CARNAME+15(20).
      WRITE :/54 'TOT:', HEAD_TAB-OCHRG ,95 HEAD_TAB-LRNO.
      WRITE :/58 B_INVFORCHARGE , 89 HEAD_TAB-LRDT.
      WRITE :/17 HEAD_TAB-LSTNO,58 B_INVOCTROI , 99 HEAD_TAB-MODEPAY.
    HEAD_TAB-GTOTAL = B_INVRATE + B_INVSTAX + B_INVOCTROI + B_INVFORCHARGE.
      WRITE :/17 HEAD_TAB-CSTNO,61 HEAD_TAB-GTOTAL.
      PERFORM CONVERT.
      WRITE :/ ' ',/,/.
      WRITE :/17 HEAD_TAB-PLSTNO4(31),44 B_AMOUNTINWORDS0(100).
      WRITE :/17 HEAD_TAB-PCSTNO4(31),44 B_AMOUNTINWORDS100(100).
      WRITE : /.
    ENDFORM.
    *HEADER INFO PRINTING*
    FORM HEADER.
      DATA : B_POREF(35).
    *concatenate head_tab-poref '/' head_tab-podat into b_poref.
      CONDENSE HEAD_TAB-PODAT.
      CONDENSE HEAD_TAB-POREF.
      FORMAT INTENSIFIED OFF.
      WRITE : / ' ',/,/.                   "a line feed is removed
      WRITE : / '  ',83 HEAD_TAB-PNAM1.
      WRITE : / '  ',83 HEAD_TAB-PNAM2.
      WRITE : / '  ',83 HEAD_TAB-PNAM3.
      PRINT-CONTROL FUNCTION 'CI010'.
      WRITE : /13 HEAD_TAB-DOCNO,61 HEAD_TAB-DOCDT.
      PRINT-CONTROL FUNCTION 'CI015'.
      WRITE : '  ',86 HEAD_TAB-PNAM5.
      WRITE :/83 HEAD_TAB-PNAM4.
      WRITE : / ' ',/, 90 HEAD_TAB-SPSHIPI+0(30).
      WRITE : /8 SOLDP_TAB-NAME ,47 SHIPP_TAB-NAME,
                90 HEAD_TAB-SPSHIPI+30(10).
      WRITE : / ' ',8 SOLDP_TAB-ADD1 , 47 SHIPP_TAB-ADD1.
      WRITE : / ' ',8 SOLDP_TAB-ADD2 , 47 SHIPP_TAB-ADD2.
      WRITE : / ' ',8 SOLDP_TAB-ADD6 , 47 SHIPP_TAB-ADD6,
                    90 HEAD_TAB-SPCARIN+0(30).
      WRITE : / ' ',8 SOLDP_TAB-ADD3 , 47 SHIPP_TAB-ADD3,
                 90 HEAD_TAB-SPCARIN+30(10).
      WRITE : / ' ',8 SOLDP_TAB-ADD4 , 47 SHIPP_TAB-ADD4.
      WRITE : / ' ',25 HEAD_TAB-CCODE ,68 HEAD_TAB-CPERSON ,
                   109 HEAD_TAB-SALESOR,/.
      MOVE HEAD_TAB-PODAT TO B_STR.
      CONCATENATE B_STR6(2) '.' B_STR4(2) '.' B_STR+2(2) INTO B_STR.
      CONCATENATE HEAD_TAB-POREF '/' B_STR INTO B_STR.
      MOVE B_STR TO HEAD_TAB-POREF.
      WRITE : / ' ',25 B_STR.
      WRITE : ' ',64 HEAD_TAB-TPHONE NO-ZERO,109 HEAD_TAB-SALOF.
      WRITE : / ' ',/,/,/,/.
    ENDFORM.
          FORM CONVERT                                                  *
    FORM CONVERT.
      DATA : B_WORDS(100).
      DATA : B_DECIS(100).
      DATA : TEMP1(40).
      DATA : TEMP2(40).
      CALL FUNCTION 'Z_CONVERSION_TO_WORDS'
           EXPORTING
                AMOUNT    = HEAD_TAB-GTOTAL
           IMPORTING
                IN_WORDS  = B_WORDS
                IN_DECMS  = B_DECIS
           EXCEPTIONS
                TOO_LARGE = 1
                OTHERS    = 2.
      MOVE HEAD_TAB-GTOTAL TO TEMP1.
      SPLIT TEMP1 AT '.' INTO TEMP1 TEMP2.
      IF HEAD_TAB-BILLCUR EQ 'INR'.
        IF TEMP2 NE '00'.
          CONCATENATE 'Rupees' B_WORDS 'and paise' B_DECIS
                      INTO B_AMOUNTINWORDS SEPARATED BY SPACE.
        ELSE.
          CONCATENATE 'Rupees' B_WORDS B_DECIS
                      INTO B_AMOUNTINWORDS SEPARATED BY SPACE.
        ENDIF.
      ELSE.
        CONCATENATE HEAD_TAB-BILLCUR B_WORDS B_DECIS
                    INTO B_AMOUNTINWORDS SEPARATED BY SPACE.
      ENDIF.
    ENDFORM.
          FORM GETTAXFORLINEITEMS                                       *
    -->  INVO                                                          *
    FORM GETTAXFORLINEITEMS USING INVO.
      DATA: BEGIN OF TKOMVD OCCURS 0.
              INCLUDE STRUCTURE KOMVD.
      DATA: END OF TKOMVD.
      CLEAR CTYPE.
      CLEAR KOMK.
      SELECT SINGLE * FROM VBRK WHERE VBELN = INVO.
      MOVE-CORRESPONDING VBRK TO KOMK.
      CALL FUNCTION 'RV_PRICE_PRINT_ITEM'
           EXPORTING
                COMM_HEAD_I = KOMK
                COMM_ITEM_I = KOMP
           TABLES
                TKOMV       = TKOMV
                TKOMVD      = TKOMVD
           EXCEPTIONS
                OTHERS      = 1.
      DATA : B_TAX TYPE I.
    *SALES TAX pervcentage for line items.
      MOVE 'I' TO CTYPE-SIGN.
      MOVE 'BT' TO CTYPE-OPTIONS.
      MOVE 'ZIN4' TO CTYPE-HIGH.
      MOVE 'ZIN1' TO CTYPE-LOW.
      APPEND CTYPE.
    ENDFORM.
          FORM IFENDOFPAGE                                              *
    -->  LINECTR                                                       *
    -->  B_SUBTOTAL                                                    *
    FORM IFENDOFPAGE USING LINECTR B_SUBTOTAL.
      IF LINECTR EQ 19.
        WRITE : / ' ',/,10 'Carried forward '.
        PERFORM PUTALINE.
        WRITE :83 B_SUBTOTAL.
        ADD 1 TO LINECTR.
                                           "do 37 times.
        DO 24 TIMES.
          WRITE : ' ',/.
        ENDDO.
        PERFORM HEADER.
        WRITE : /10 'Brought forward'.
        PERFORM PUTALINE.
        WRITE : 83 B_SUBTOTAL.
        LINECTR = 1.
      ENDIF.
    ENDFORM.
          FORM PUTALINE                                                 *
    FORM PUTALINE.
      DO 27 TIMES.
        WRITE : '-'.
      ENDDO.
      WRITE '>'.
    ENDFORM.
          FORM ERRORCHECK                                               *
    -->  SY-SUBRC                                                      *
    FORM ERRORCHECK USING SY-SUBRC.
      IF SY-SUBRC NE 0.
        PERFORM WIN_INFO(ZURL) USING 'Error' 'Document does not exists'
                                     'Please re-enter the doc #'.
        SET SCREEN 1000.
        LEAVE SCREEN.
        EXIT.
      ENDIF.
    ENDFORM.
          FORM SOLD_TO_PARTY_CHANGE                                     *
    -->  B_INVNO                                                       *
    FORM SOLD_TO_PARTY_CHANGE USING B_INVNO.
    *TO CHANGE THE SOLD TO PARTY FOR THE BILLING DOCUMENT.
      DATA : BEGIN OF NEW_SHIP_TAB OCCURS 0.
      DATA : DESC(20).
      DATA : CUSTCODE LIKE KNA1-KUNNR.
      DATA : DUMMY(5).
      DATA : CUSTNAME LIKE KNA1-NAME1.
      DATA : END OF NEW_SHIP_TAB.
      DATA : B_TABIX LIKE SY-TABIX.
      DATA : B_SOLDCODE LIKE KNA1-KUNNR.
      DATA : B_PAYCODE LIKE KNA1-KUNNR.
      SELECT * FROM VBPA WHERE VBELN EQ B_INVNO
                                AND PARVW IN ('RE','WE','AG').
        SELECT SINGLE * FROM KNA1 WHERE KUNNR EQ VBPA-KUNNR.
        MOVE KNA1-NAME1 TO NEW_SHIP_TAB-CUSTNAME.
        MOVE KNA1-KUNNR TO NEW_SHIP_TAB-CUSTCODE.
        MOVE '      ' TO NEW_SHIP_TAB-DUMMY.
        CASE VBPA-PARVW.
          WHEN 'WE'.
            MOVE 'SHIP TO PARTY' TO NEW_SHIP_TAB-DESC.
            MOVE KNA1-KUNNR TO B_PAYCODE.
          WHEN 'RE'.
            MOVE KNA1-KUNNR TO B_SOLDTOPARTYCODE.
            MOVE 'PAYER        ' TO NEW_SHIP_TAB-DESC.
          WHEN 'AG'.
            MOVE KNA1-KUNNR TO B_SOLDCODE.
            MOVE 'SOLD TO PARTY' TO NEW_SHIP_TAB-DESC.
        ENDCASE.
        APPEND NEW_SHIP_TAB.
      ENDSELECT.
      B_SPCFLAG = 'F'.
      IF B_SOLDCODE NE B_SOLDTOPARTYCOD

    Hi Sanjeev ,
    Please observe your code carefully.
    You say you have assigned your form name in the Print Program ,but i am not able to find it.
    Your program uses the Subroutine
    PERFORM OPENFORM USING 'ZINVOICEDUMMY'
    where the 'ZINVOICEDUMMY' is the parameter value your are passing for FORM but your form name is zinv.
    so you have to pass your form name using this subroutine.
    PERFORM OPENFORM USING 'ZINV'
    FORM OPENFORM USING B_FORMNAME.
    CALL FUNCTION 'OPEN_FORM'
    EXPORTING
    FORM = B_FORMNAME
    OPTIONS = ITCPO
    DEVICE = B_ELEMENT
    IMPORTING
    RESULT = ITCPP
    EXCEPTIONS
    CANCELLED = 1
    DEVICE = 2
    FORM = 3
    OPTIONS = 4
    UNCLOSED = 5
    OTHERS = 6.
    ENDFORM.
    Regards,
    AShwini

  • User exit while saving Service Purchase Order

    i want to update one z table from the Service PO, after saving. Hence i require , an user exit, which will give the details of the service tab , of the PO. I am not able to get any exit, where the details of the Service tab, of the transaction me22n.
    Below is the screen of the Service tab of the purchase Order Screen :
                                                                                    <b>Line      DeService numbShort text                   Quantity          Uni    Gross priceCr
        10          3000001     Sub-Con Recruitment Commissio91                DAY1,249.00       IN
        20          3000001     Sub-Con Recruitment Commissio91                DAY1,249.00       IN</b>

    hi,
    check this out .
    Transaction Code - ME21 Create Purchase Order
    Exit Name Description
    AMPL0001 User subscreen for additional data on AMPL
    LMEDR001 Enhancements to print program
    LMELA002 Adopt batch no. from shipping notification when posting a GR
    LMELA010 Inbound shipping notification: Transfer item data from IDOC
    LMEQR001 User exit for source determination
    LMEXF001 Conditions in Purchasing Documents Without Invoice Receipt
    LWSUS001 Customer-Specific Source Determination in Retail
    M06B0001 Role determination for purchase requisition release
    M06B0002 Changes to comm. structure for purchase requisition release
    M06B0003 Number range and document number
    M06B0004 Number range and document number
    M06B0005 Changes to comm. structure for overall release of requisn.
    M06E0004 Changes to communication structure for release purch. doc.
    M06E0005 Role determination for release of purchasing documents
    ME590001 Grouping of requsitions for PO split in ME59
    MEETA001 Define schedule line type (backlog, immed. req., preview)
    MEFLD004 Determine earliest delivery date f. check w. GR (only PO)
    MELAB001 Gen. forecast delivery schedules: Transfer schedule implem.
    MEQUERY1 Enhancement to Document Overview ME21N/ME51N
    MEVME001 WE default quantity calc. and over/ underdelivery tolerance
    MM06E001 User exits for EDI inbound and outbound purchasing documents
    MM06E003 Number range and document number
    MM06E004 Control import data screens in purchase order
    MM06E005 Customer fields in purchasing document
    MM06E007 Change document for requisitions upon conversion into PO
    MM06E008 Monitoring of contr. target value in case of release orders
    MM06E009 Relevant texts for "Texts exist" indicator
    MM06E010 Field selection for vendor address
    MMAL0001 ALE source list distribution: Outbound processing
    MMAL0002 ALE source list distribution: Inbound processing
    MMAL0003 ALE purcasing info record distribution: Outbound processing
    MMAL0004 ALE purchasing info record distribution: Inbound processing
    MMDA0001 Default delivery addresses
    MMFAB001 User exit for generation of release order
    MRFLB001 Control Items for Contract Release Order
    LMEKO001 Extend communications structure KOMK for pricing
    LMEKO002 Extend communications structure KOMP for pricing
    MM06E011 Activation of PReq Lock
    No of Exits: 38
    Kishi.

  • Calculate Pricing in Sales Order Based on Characterestic Values

    Hi All,
    We are using Sales Order and assigning service product as material. On saving sales order, a service order is created. Per SAP standard design, we can only assign Qty=1 for the service product. As a work around, we have a characteristics that captures service quantity. Now I want to influence pricing based on this char value using Calculation Type Formula in the pricing procedure.
    Please suggest as to how I can capture the characteristics value in the formula routine created using VOFM? Is there any structure that shows the characteristics value during run time of order creation?

    hey,
    go throw structures KOMP ( VBAP ) and KOMV ( VBAK) and manipulate with your subroutine
    the qty and the net value .
    Before Saving - KOMK,KOMP --> running the pricing functions ( matching according to the access )
                          ---> KOMV --> XKOMV
    After Saving    ========>      VBAK/VBAP
    you can capture the values throw this structures .
    BR
    ASA

  • Re: Pricing for more than one ship-to-party in sales order

    Hi Gurus,
    Currently I am facing a problem regarding pricing the shipping charge for a sales order having more than one ship-to parties in it.
    Our business process is having a pricing condition type which calculates the shipping charge based on the total value of the order.
    The technical details of the condition type are as follows:
    ZSHH
    Cond. class =    A  Discount or surcharge                  Plus/minus  =  A Positive
    Calculat.type =  B  Fixed amount
    "Group cond" & "RoundDiffComp" are "checked"
    GrpCond.routine 1  Overall Document
    Scale basis = value
    Now due to this depending on the entire order value the shipping cost is calculated.
    However when there are 2 ship-to-party the system should group the items to be shipped to each ship-2-party and calculate the prices accordingly.
    Now as the "GrpCond.routine 1  Overall Document" -- it is taking the total order value while calculating the shipping price even if there are 2 ship2party in the sales order. I am just wondering how to go about this situation.
    There is no value in the pricing formula that calculates the price based on ship-2-party.
    Can anyone help me with this?
    Does this mean that I have to create a new scale formula in VOFM?
    Also how is the shipping price charged when the customer requests partial deliveries?
    Thanks in advance
    Vinit

    Vinit,
       You need to create a new GrpCond.routine. You can do this in VOFM-> Formulas -> Structure of group key. You will need to have the carrier available in the communication structure komp. So assuming you do this, create a formula like 050(RV65A050). Enter code that would look like(I am assuming your carrier code is 10 in length):
    FORM FRM_GRUPPENKEY_050.
      xvakey      = '050'.
      Xvakey+3(10) = komp-carrier.
    ENDFORM.
    Then assign 50 to the condition type(v/06) as the new GrpCond routine. This should give you your desired results.
    Partial deliveries will only take the portion of delivery charges shipped from the line. Eg if 10$ freight on the line and 1 of 2 is shipped, you will only see 5$ on that invoice as long as your pricing rule is copy unchanged.
    Edited by: Matthew Menzies on Jan 21, 2009 11:26 PM

  • User Exit/ BADI for ME01- Sourcelist creation

    Hiii
    We need a place exit/ BADi to do vendor validation before saving soource list in transaction ME01.
    Please provide suitable exit / badi for above requirement.
    Thanks ...in advance.!!
    Regards,
    Nilesh

    EXIT_SAPLMBMP_003     AMPL0001     User subscreen for additional data on AMPL
    EXIT_SAPLMEKO_001     LMEKO001     Extend communications structure KOMK for pricing
    EXIT_SAPLMEKO_002     LMEKO002     Extend communications structure KOMP for pricing
    EXIT_SAPLMEQR_001     LMEQR001     User exit for source determination
    EXIT_SAPLMEQR_001     LMEQR001     User exit for source determination
    EXIT_SAPLQBCK_002     QBCK0002     Extended check in procurement

Maybe you are looking for

  • "Library.itl file cannot be found or created"

    My iTunes 8.0 was working fine and then all of the sudden I get this message whenever I try to open iTunes. "The iTune Library.itl file cannot be found or created. The default location for this file is in the "iTunes" folder in the "Music" folder." T

  • Error message - Network connection was refused!!!

    Every time I try to access iTunes music store I get this error: "iTunes could nopt connect to the Music Store. The network connection was refused. Make sure your network settings are correct and your network conection is active, then try again." My n

  • Delivery and Service Header Fields in RNIF Receiver Adapter for Rosettanet.

    Hello all, I need to populate the Delivery and Service header fields in Rosattenet MIME message in the receiver side.  For the sender side RNIF adapter, we can very well use the Adapter Specific message to get those fields from Rosattenet MIME messag

  • Flash won't download into IE - fine w/Firefox

    I'm very frustrated by not being able to download and install the latest version of Flash Web Player when using IE (6.0.2900.2180, sp2), Windows XP Pro. The current version of Flash, from IE, is 7,0,19,0). I have admin rights, no pop-up-blocker indic

  • Charge Off Questions

    I'm trying to rebuild my credit but I have some recent unpaid charge offs. The charge offs are for $10k and $4 and both are from 3-6 months ago. I had cancer in 2008 and again in 2010. Getting back on my feet financially but don't have the $$$ to pay