SAP PP- doubt in operation

We have the operations say 0010 to 0070, if a component gets damaged or scrap during 0030 operation. Then how the process is continued
1)     how it is reworked for damages(steps to rework)
2)     or how it is made Scrap if it in not managed from rework & whare scarp amount is updated or processed.
Thanks in advance

Hi,
  Check up this for the rework process: [Rework Process|rework;
During confirmation, the scrap qty is mentioned in the production process. During quality, the scrap qty is moved to blocked stock to the respective scrap location.
Hope this helps...
-Thaila Shree

Similar Messages

  • Integrating with sap , some doubt

    Hello friends ,
    i am trying to integrate my JBOSSMQ of JBOSS4.0 APP Server with SAP.
    For that i need to set few parameters in SAP like the QueueConnectory Factory, Queue , etc.
    I found out that the QueueConnectoryFactory is org.jboss.mq.SpyConnectorFactory.
    for Queue its org.jboss.mq.SpyQueue.
    but i am not able to find few things that SAP requires.
    1) The Channel that QueueConnectorFactory Uses in Jboss.
    2) The Transport Type that QueueConnectorFactory uses in Jboss .
    3) The QueueManager used in Jboss . etc
    So i am not able to set these parameters in SAP.
    I had posted a similar query last time which was deleted by admins, may be coz i hadnt put it properly .
    Hope here i have explained my doubts clearly.
    Thanks and do help if you know this EAI related stuff.

    I know little of SAP however...
    "Channel", "TransportType" and "QueueManager" sound more like WebSphereMQ configuration properties than JBoss properties so double check the documentation.
    Also go to the SAP developer network at https://www.sdn.sap.com/irj/sdn/index, you may have some luck there.
    Regards,
    Colin.
    http://hermesjms.com

  • I fail to start the sap server with error:Operating system call recv failed

    I fail to start the sap server in SAP R3 Management Console and the message in the syslog was :
    R/3 Basis System: Operating system call           recv failed (error no. 10053)
    Is there any one could tell me how to resolve the problem or give me some advice?I will appreciate him/her very much.Thank you.

    trc file: "dev_disp", trc level: 1, release: "620"
    Sun May 07 13:14:30 2000
    kernel runs with dp version 3(ext=1) (@(#) DPLIB-INT-VERSION-3)
    length of sys_adm_ext is 304 bytes
    systemid   560 (PC with Windows NT)
    relno      6200
    patchlevel 0
    patchno    674
    intno      20020600
    pid        3628
    ***LOG Q00=> DpSapEnvInit, DPStart (00 3628) [dpxxdisp.c   978]
         shared lib "dw_xml.dll" version 674 successfully loaded
         shared lib "dw_xtc.dll" version 674 successfully loaded
         shared lib "dw_stl.dll" version 674 successfully loaded
    Sun May 07 13:14:32 2000
    WARNING => DpNetCheck: NiAddrToHostCanon() took 2 seconds
    Sun May 07 13:14:37 2000
    WARNING => DpNetCheck: NiAddrToHost(1.0.0.0) took 5 seconds
    ***LOG GZZ=> 2 possible network problems detected - check tracefile and adjust the DNS settings [dpxxtool2.c  3212]
    MtxInit: -2 0 0
    DpShMCreate: sizeof(wp_adm)          12784     (752)
    DpShMCreate: sizeof(tm_adm)          1690816     (8412)
    DpShMCreate: sizeof(wp_ca_adm)     18000     (60)
    DpShMCreate: sizeof(appc_ca_adm)     6000     (60)
    DpShMCreate: sizeof(comm_adm)     192000     (384)
    DpShMCreate: sizeof(wall_adm)     (22440/34344/56/100)
    DpShMCreate: SHM_DP_ADM_KEY          (addr: 001E0040, size: 1977824)
    DpShMCreate: allocated sys_adm at 001E0040
    DpShMCreate: allocated wp_adm at 001E0560
    DpShMCreate: allocated tm_adm_list at 001E3750
    DpShMCreate: allocated tm_adm at 001E3778
    DpShMCreate: allocated wp_ca_adm at 00380438
    DpShMCreate: allocated appc_ca_adm at 00384A88
    DpShMCreate: allocated comm_adm_list at 003861F8
    DpShMCreate: allocated comm_adm at 00386210
    DpShMCreate: allocated ca_info at 003B5010
    DpShMCreate: allocated wall_adm at 003B5018
    MBUF state OFF
    Sun May 07 13:14:38 2000
    EmInit: MmSetImplementation( 2 ).
    <ES> client 0 initializing ....
    <ES> InitFreeList
    <ES> block size is 1024 kByte.
    Using implementation std
    <EsNT> Memory Reset enabled as NT default
    <EsNT> EsIUnamFileMapInit: Initialize the memory 2458 MB
    <ES> 2457 blocks reserved for free list.
    ES initialized.
    ***LOG Q0K=> DpMsAttach, mscon ( db01) [dpxxdisp.c   9115]
    CCMS: Initalizing shared memory of size 20000000 for monitoring segment.
    CCMS: start to initalize 3.X shared alert area (first segment).
    DpMsgAdmin: Set release to 6200, patchlevel 0
    MBUF state PREPARED
    MBUF component UP
    DpMBufHwIdSet: set Hardware-ID
    ***LOG Q1C=> DpMBufHwIdSet [dpxxmbuf.c   941]
    DpMsgAdmin: Set patchno for this platform to 674
    Release check o.K.
    Sun May 07 13:15:18 2000
    ERROR => W2 (pid 4776) died [dpxxdisp.c   11523]
    force unlock of wp_adm mutex W2
    Sun May 07 13:15:38 2000
    ERROR => W5 (pid 4548) died [dpxxdisp.c   11523]
    force unlock of wp_adm mutex W5
    ERROR => W8 (pid 4592) died [dpxxdisp.c   11523]
    force unlock of wp_adm mutex W8
    ERROR => W9 (pid 4584) died [dpxxdisp.c   11523]
    force unlock of wp_adm mutex W9
    ERROR => W12 (pid 4676) died [dpxxdisp.c   11523]
    force unlock of wp_adm mutex W12
    ERROR => W13 (pid 4272) died [dpxxdisp.c   11523]
    force unlock of wp_adm mutex W13
    my types changed after wp death/restart 0xbf --> 0xb7
    Sun May 07 13:15:58 2000
    ERROR => W4 (pid 4888) died [dpxxdisp.c   11523]
    force unlock of wp_adm mutex W4
    ERROR => W6 (pid 4788) died [dpxxdisp.c   11523]
    force unlock of wp_adm mutex W6
    ERROR => W15 (pid 4596) died [dpxxdisp.c   11523]
    force unlock of wp_adm mutex W15
    Sun May 07 13:16:18 2000
    ERROR => W1 (pid 4892) died [dpxxdisp.c   11523]
    force unlock of wp_adm mutex W1
    ERROR => W3 (pid 4904) died [dpxxdisp.c   11523]
    force unlock of wp_adm mutex W3
    ERROR => W7 (pid 4000) died [dpxxdisp.c   11523]
    force unlock of wp_adm mutex W7
    ERROR => W10 (pid 4864) died [dpxxdisp.c   11523]
    force unlock of wp_adm mutex W10
    my types changed after wp death/restart 0xb7 --> 0xb5
    Sun May 07 13:16:38 2000
    ERROR => W0 (pid 4900) died [dpxxdisp.c   11523]
    force unlock of wp_adm mutex W0
    ERROR => W11 (pid 4500) died [dpxxdisp.c   11523]
    force unlock of wp_adm mutex W11
    ERROR => W14 (pid 4636) died [dpxxdisp.c   11523]
    force unlock of wp_adm mutex W14
    ERROR => W16 (pid 3532) died [dpxxdisp.c   11523]
    force unlock of wp_adm mutex W16
    my types changed after wp death/restart 0xb5 --> 0x80
    DP_FATAL_ERROR => DpEnvCheck: no more work processes
    DISPATCHER EMERGENCY SHUTDOWN ***
    DpModState: change server state from STARTING to SHUTDOWN
    Sun May 07 13:16:42 2000
    ***LOG Q0M=> DpMsDetach, ms_detach () [dpxxdisp.c   9341]
    MBUF state OFF
    MBUF component DOWN
    ***LOG Q05=> DpHalt, DPStop ( 3628) [dpxxdisp.c   7883]

  • Hi sap query doubt

    where shud we add two additional fields in SAP query ? actually i am not able to locate the query but i have the program whch is generated along it . so in whch section of the query i shud write the logic to get two additional fields ?

    Hi,
    Already there are some Infosets (tables) defined in that query.
    Go to that infosets and add extra fields which are there in those tables
    or add extra infoset(table) and link it to the existing table with the key, then add that table field.
    No need to write the code.
    Only thing is to select that field on to the Selection screen or on to the output is required.
    See the help:
    http://help.sap.com/saphelp_46c/helpdata/en/35/26b413afab52b9e10000009b38f974/content.htm
    http://www.thespot4sap.com/Articles/SAP_ABAP_Queries_Introduction.asp
    Step-by-step guide for creating ABAP query
    http://www.sappoint.com/abap/ab4query.pdf
    ABAP query is mostly used by functional consultants.
    SAP Query
    Purpose
    The SAP Query application is used to create lists not already contained in the SAP standard system. It has been designed for users with little or no knowledge of the SAP programming language ABAP. SAP Query offers users a broad range of ways to define reporting programs and create different types of reports such as basic lists, statistics, and ranked lists.
    Features
    SAP Query's range of functions corresponds to the classical reporting functions available in the system. Requirements in this area such as list, statistic, or ranked list creation can be met using queries.
    All the data required by users for their lists can be selected from any SAP table created by the customer.
    To define a report, you first have to enter individual texts, such as titles, and select the fields and options which determine the report layout. Then you can edit list display in WYSIWYG mode whenever you want using drag and drop and the other toolbox functions available.
    ABAP Query, as far as I Believe, is the use of select statements in the ABAP Programming. This needs a knowledge of Open SQL commands like Select,UPdtae, Modify etc. This has to be done only by someone who has a little bit of ABAP experience.
    To sum up, SAP queries are readymade programs given by SAP, which the user can use making slight modification like the slection texts, the tables from which the data is to be retrieved and the format in which the data is to be displayed.ABAP queries become imperative when there is no such SAP query existing and also when there is a lot of customizing involved to use a SAP Query directly
    use either SQ02 ans SQ01
    or SQVI tr code
    for more information please go thru this url:
    http://www.thespot4sap.com/Articles/SAP_ABAP_Queries_Create_The_Query.asp
    http://goldenink.com/abap/sap_query.html
    Please check this PDF document (starting page 352) perhaps it will help u.
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVQUE/BCSRVQUE.pdf
    check the below link will be helpful for u
    Tutorial on SQVI
    once you create query system generates a report starting with AQZZ/SAPQUERY/ABAGENCY2======= assing this report to tr code for the same
    reward if useful
    regards,
    Anji

  • SAP Query Doubt

    Hi, Guys!
        I'm trying to create a SAP Query, which should display the old and the new position of employee.
        The problem is that the SAP Query generates 2 lines for each position, the employee had.
       We need a report that display in two or tree a column for each position the employee had. And we have one line for each employee.
        Can we do this in SAP Query? Or will we need a development for this report?
    Regards,

    If it is just an addition of previous/old position, I would recommend creating a new field and field group within the infoset of SAP query framework. You may also have to write a small piece of code within the infoset to populate the field value.
    If your business scenario is getting complex it is better to have a simple ABAP report rather than enhancing the SAP query.
    Thanks
    Ravikumar

  • SAP CLM doubts

    Hi experts
    I have some doubts about CLM.
    Is CLM a E-sourcing or SRM component?
    Can I implement only CLM?
    Can I integrate CLM with ECC and how?
    How is the process when integrate CLM with ECC?

    Hi Venkateshwara,
    CLM/Sourcing to ECC - use to create "Purchase orders, Outline agreements, scheduling agreemnts"
    CLM/Sourcing to SRM - use to create "Central Contacts" and this can then be distributed to the ECC systems connected to SRM (if ECC is connected to SRM).
    On the above points can you elaborate a little ...
    1. CLM/Sourcing to ECC --
          Where the Purchase Order, Outline Agreements and Scheduling agreements are created ? Did they got created in CLM and pushed to ECC?
          After reading a few documents from market place i never observed anywhere that we create PO's, Outline Agreement and Scheduling agreements.
    2. CLM/Sourcing to SRM --
         Where the central contracts are created? Did they got created in CLM and pushed back to SRM (and from SRM it will be transferred to ECC?)
         If we are creating a Central contract in CLM then what is the need to push them back to SRM and from there to ECC? Cant we directly push the central contract to        ECC?
    3. Also on what reasons we integration CLM to both  ECC and SRM?
    4. If we would like to use only Central Contracts then CLM-SRM integration is enough?
    Please correct me if my understanding is wrong...

  • 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

  • Doubt regarding Operational Config Params

    Hi,
    I am running a coherence cluster and in my tangosol-coherence-override.xml file :
    1. While configuring WKA I am not able to use any other port other than 8088. Any way I can specify my own port.
    2. And my replicated cache errors while starting up when I configure it using the services tag.

    Hi user1945969,
    1. When you say that you can only use port 8080 when configuring WKA, do you mean this is the only port you can specify in the WKA list or the only port you can use for your cache server?
    First, you can confifure WKA in your tangosol-coherence-override.xml like this
    <unicast-listener>
      <well-known-addresses>
        <socket-address>
          <address>hostname</address>
          <address>1234</address>
        </socket-address>
        <socket-address>
          <address>hostname</address>
          <address>5678</address>
        </socket-address>
      </well-known-addresses>
    </unicast-listener>You just repeat the <socket-address> sections for however many host/port combinations you want in your list.
    2. You really should not need to do anything with the services section in your overrides file - in fact your tangosol-coherence-override.xml does not need to have a services section. All the settings for the services are configured in your cache configuration file. I think this was pointed out in your other post.
    JK

  • Sap note doubt (105621 - Authorization check for the condition )

    Hi experts,
    I am wondering if this note takes effect also in Mm transactions.
    Does anyone have experience with this?
    Thanks!!
    Artur.

    Hi Artur,
    I guess you should post in service market place instead SDN....
    Arpan

  • SAP Performance Doubt -

    Dear All,
    Can you please let me know, if I can use 'IN' instead of 'OR' in select statement. Also Let me know which one will have better performance.
    here is code.
    DATA: BEGIN OF ITAB OCCURS 0,
           EBELN TYPE EKPO-EBELN,
           EBELP TYPE EKPO-EBELP,
           AEDAT TYPE EKPO-AEDAT,
           MATNR TYPE EKPO-MATNR,
           MENGE TYPE EKPO-MENGE,
          END OF ITAB.
    select EBELN EBELP AEDAT MATNR MENGE INTO TABLE ITAB
                 FROM EKPO
                 WHERE ( EBELN = '414001' OR
                         EBELN = '41200'  ) .
    or
    select EBELN EBELP AEDAT MATNR MENGE INTO TABLE ITAB
                 FROM EKPO
                 WHERE  EBELN IN ('414001','41200') .
    will the two codes have same output.which code has better performance ?
    Thank you.
    Madhu
    Moderator message - Moved to the correct forum
    Edited by: Rob Burbank on May 27, 2009 2:30 PM

    Dear All,
    Thank you for your replies.
    I used SE30 to evaluate the performance of both statements. I agree with the point that first executed program takes more time. second executed program is using the cache and taking less time.
    I am using 'IN' is my program as it is easy to read.
    I am closing this thread and allotting points to all of you.
    BUT, Honestly This is still not 100% answered. 
    Thank you.
    Madhu.

  • Update Operation to SAP Failed using BDC Model

    Hi All,
    I am working in Duet Enterprise 1.0 development in SharePoint. At SAP front Query, Read and Update operations have been developed and the corresponding WSDL and Endpoint URLs are generated.
    I need to use these WSDL and Endpoint urls and perform Update operation in SharePoint. For this I need to pass the parameters POSCLKey, CorrelationID, ReleaseCode and PONumber for the update operation.
    I have written the following code:
     using (new Microsoft.SharePoint.SPServiceContextScope(SPServiceContext.GetContext(site)))
    BdcService service =
    SPFarm.Local.Services.GetValue<BdcService>();
                            IMetadataCatalog
    catalog = service.GetDatabaseBackedMetadataCatalog(SPServiceContext.Current);
    //IEntity entity = catalog.GetEntity(ConfigurationManager.AppSettings["NameSpace"], ConfigurationManager.AppSettings["EntityName"]);
    IEntity entity = catalog.GetEntity("http://bccplmoss:9999",
    "Purchase Order V1");
    foreach (KeyValuePair<string,
    IMethod> methods in entity.GetMethods())
    ILobSystemInstance LobSysteminstance = entity.GetLobSystem().GetLobSystemInstances()[0].Value;
    IFieldCollection fieldCollection = entity.GetUpdaterView("UpdatePO").Fields;
    IMethodInstance methodInstance = entity.GetMethodInstance("UpdatePO",
    MethodInstanceType.Updater);
    string Relcode = "V1";
    //string[] parameters = { "1022_7400000011_ZPURCHASE_ORDER_HEADER_SPI_SERV_160", "7400000011", Relcode };
    Identity identity = new
    Identity("1022_7400000011_ZPURCHASE_ORDER_HEADER_SPI_SERV_160");
    IMethodInstance methodinstance = methods.Value.GetMethodInstances()[methods.Key];
                               IEntityInstance
    entityinstance = null;
    entityinstance = entity.FindSpecific(identity, LobSysteminstance);
                                entityinstance.Update();
    Error Details Are:
    Error Occurred in the following line:
    entityinstance = entity.FindSpecific(identity, LobSysteminstance);
    Error Description:  The shim execution failed unexpectedly - The incoming policy could not be validated. For more information, please see the event log..
    Is there any Alternate Method to update the data into SAP through BDC model? Please suggest me at the earliest.
    Thanks & Regards,
    Murali Krishna Tatoju
    Best Regards, Murali Krishna Tatoju SAP Duet Developer

    Hi all,
    Now we are able to pass all the required input data to the update operation
    and no errors exist for this operation. But when we execute the update operation, the PO is not getting updated at SAP. But same operation
    is working fine from DUET-ABAP. As a test, we executed this operation from DUET ABAP front and generated the log (/iwfnd/view_log) log
    has been generated. The same operation when we executed from Sharepoint and when we looked into 14-hive logs, nothing has got generated
    for update operation. 
    Note: when executed this update operation from SharePoint, in /iwfnd/view_log, no logs generated for updated operation.
    Please suggest me a way so that I can sort out this issue.
    Best Regards, Murali Krishna Tatoju SAP Duet Developer

  • Doing MS in software engineering from SAP India, banglore

    Hi,
    I completed my graduate in 2013 and currently working as a ABAP technical consultant in one of the IT firm. I really want to have good career in SAP. I have heard about MS in software engineering program from SAP india .Can anyone please guide me in knowing is it worth doing MS from there and if so then what is the procedure to go for.

    Hi Kumar,
    The below information may be helpful for you.
    The Birla Institute of Technology and Science popularly known as
    BITS which is a multi-campus university with campuses in India at Pilani
    (Rajasthan), Goa and Hyderabad and international campus at Dubai (UAE) gets its
    position among top ranking universities for a variety of reasons. BITS has been
    accredited by National Assessment and Accreditation Council – NAAC with a CGPA
    of 3.71 out of 4 and VERY GOOD status.
    For the year 2009, surveys by leading media giants which include
    India Today, Outlook and LiveMint have ranked BITS Pilani among top 10 Best
    Engineering Colleges. BITS is well known for its transparency in selection
    criteria based on the online BITSAT examination for all its degree programs.
    The alumni of the Institute who are ambassadors for Brand BITS are spread
    across the globe from Australia through Europe to America.
    BITS Pilani has set a benchmark in industry university
    collaborations through the Practice School Program for all its campus program
    students which is analogous to Internship by Medical graduates and Work
    Integrated Learning Programs for addressing the HRD needs of a wide array of
    corporates drawn from IT Majors, Process Majors, Pharma Majors, Engineering
    Majors, Power Majors and Healthcare Majors.
    SAP Labs India is SAP's second largest Research & Development
    and Global Services & Support center in the world. Founded in November
    1998, SAP Labs India is one of the four global development hubs (Germany, US
    and Israel being others) of SAP that contribute to all areas of the SAP product
    value chain- Research & Breakthrough Innovation, Product Development,
    Global Services & Support and Customer Solutions & Operations.
    SAP's eight Labs in different countries are undoubtedly industry
    role models for globally distributed development organizations and contribute
    in a big way to the goals of SAP's business units. Bridging the gap between
    local market demands and SAP's development organization, SAP Labs is well known
    for setting standards for excellence in innovation, efficiency, and reliability.
    With extensive employee learning system, management excellence and
    world class infrastructure in place, SAP without doubt finds a place in the
    Top-5 Best Workplaces among IT Software organizations.
    BITS Pilani and SAP Labs India signed a Memorandum of Understanding
    (MoU) and launched on 08 August 2008, the four year MS Software Engineering
    work integrated learning program for candidates holding BSc or equivalent
    qualification recruited and sponsored by SAP.
    On 06 August 2009, in a brief function organized at Bengaluru, SAP
    Labs and BITS Pilani launched the two year MS Software Engineering work
    integrated learning program for candidates holding B.E / B.Tech or equivalent
    qualification recruited and sponsored by SAP.
    Mr Ramakrishna Yarlapati (Ramki) Senior Vice President BST –
    Business Suite Core India, SAP Labs welcomed the gathering for the launch
    function and gave highlights of the BITS Pilani - SAP Labs collaboration and
    HRD focus of SAP.
    Mr Joachim Hechler Corporate Officer and Executive Council Member of
    SAP AG Group and EVP for SAP Business Suite who had specially flown to India
    for this occasion emphasized on the importance of continuing education and
    urged the prospective candidates to make the best use of the opportunity.
    Apart from Swaminathan Vemur, Expert - Learning and Talent
    management, Human Resources SAP Labs, who had tirelessly worked out the details
    to make the launch function a grand one, several senior executives of SAP Labs
    and prospective candidates enrolling for the program attended the launch
    function
    Prof BR Natarajan Dean Work Integrated Learning Programmes from
    BITS Pilani presented the salient features of the BITS model of Work Integrated
    Learning programmes with focus on the customized two year MS Software
    Engineering programme specially designed to address the HRD needs of SAP Labs.
    Mr Sai Sekhar Das faculty member of BITS Pilani who is spear heading various
    off campus activities of the Institute at Bangalore which include collaboration
    with various industries for degree programs and Practice School was also
    present for the launch function.
    Also Please see the below links
    SAP India - Scholar@SAP, Vocational Training at SAP Labs India
    SAP Labs India and BITS Pilani - M.S. in Software Engineerin
    http://www.indiaprwire.com/pressrelease/computer-software/2009081031129.htm
    Regards,
    Dipin

  • SAP HANA Lifecycle Manager Couldn't deploy using credentials

    Hello,
    After HLM 1.0.7.7 upgrade from 1.0.6 on IBM appliance we could not apply support packages in normal mode. When we launch the Upgrade process from Hana Studio or Command line we recive the following message:
    Error Message: Execution of 'Deploys SAP Host Agent configurations using sidadm credentials' failed.
    Detailed Message: null or empty argument
    Help: http://help.sap.com/hana
    We tried to downdgrade and reinstall HLM again with no luck. Users, Parsswords and Certificates was also renewed. We could read this log from HLM.
    INFO 2014-05-08 16:05:15 com.sap.lm.hlm.common.wizard.process.WizardProcessExecutor
    Submit for subtask with ID [6cd61e09-eb68-4448-86c0-b4319abbdc3f_GetUpdateTypeTask]
    INFO 2014-05-08 16:05:15 com.sap.lm.hlm.common.wizard.process.WizardProcessExecutor
    Submit for subtask with ID [6cd61e09-eb68-4448-86c0-b4319abbdc3f_GetUpdateTypeTask]
    INFO 2014-05-08 16:05:15 com.sap.lm.hlm.common.wizard.process.WizardProcessExecutor
    Starting execution of subtask with ID [6cd61e09-eb68-4448-86c0-b4319abbdc3f_DeployConfigWithSidAdmTask]
    INFO 2014-05-08 16:05:15 com.sap.lm.hlm.common.wizard.process.WizardProcessExecutor
    Starting execution of subtask with ID [6cd61e09-eb68-4448-86c0-b4319abbdc3f_DeployConfigWithSidAdmTask]
    INFO 2014-05-08 16:05:15 com.sap.lm.hlm.common.tasks.process.AbstractProcessExecutor
    Starting process [Deploys SAP Host Agent configurations using sidadm credentials, com.sap.lm.hana.hlm.update.slpp.task.deployconfig.DeployConfigWithSidAdmTask] ({})...
    INFO 2014-05-08 16:05:15 com.sap.lm.hlm.common.tasks.process.AbstractProcessExecutor
    Starting process [Deploys SAP Host Agent configurations using sidadm credentials, com.sap.lm.hana.hlm.update.slpp.task.deployconfig.DeployConfigWithSidAdmTask] ({})...
    INFO 2014-05-08 16:05:15 com.sap.lm.util.status.StatusTracker
    Status tracker initialized using storage file /usr/sap/hlm_bootstraps/HNB/HLM/param/configdeploystatus.properties.
    INFO 2014-05-08 16:05:15 com.sap.lm.util.status.StatusTracker
    Status tracker initialized using storage file /usr/sap/hlm_bootstraps/HNB/HLM/param/configdeploystatus.properties.
    INFO 2014-05-08 16:05:15 com.sap.lm.hana.hlm.update.slpp.context.ProgressObserverAdapter
    Progress [ 0%]
    INFO 2014-05-08 16:05:15 com.sap.lm.hana.hlm.update.slpp.context.ProgressObserverAdapter
    Progress [ 0%]
    INFO 2014-05-08 16:05:15 com.sap.lm.hana.hlm.update.slpp.task.deployconfig.AbstractDeployConfigProcessExecutor
    Deploying SAP Host Agent configurations on host  with sidadm credentials.
    INFO 2014-05-08 16:05:15 com.sap.lm.hana.hlm.update.slpp.task.deployconfig.AbstractDeployConfigProcessExecutor
    Deploying SAP Host Agent configurations on host  with sidadm credentials.
    INFO 2014-05-08 16:05:15 com.sap.lm.hana.hlm.update.slpp.context.ProgressObserverAdapter
    Process message: Deploying SAP Host Agent configurations on host
    INFO 2014-05-08 16:05:15 com.sap.lm.hana.hlm.update.slpp.context.ProgressObserverAdapter
    Process message: Deploying SAP Host Agent configurations on host
    INFO 2014-05-08 16:05:16 com.sap.lm.services.hostcontrol.SAPHostControlService
    Deployed Host Agent configurations [/usr/sap/hlm_bootstraps/HNB/HLM/operations.d/update-hdb-plugin.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/update-newdb-studio-repository.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/detect-newdb-client-v2.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/detect-sedm-v2.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/install-newdb-studio-repository-v2.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/find-java-home-v2.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/install-newdb-client-v3.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/update-load-controller-v2.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/detect-sda-v2.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/uninstall-newdb-client-v2.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/install-newdb-studio-v2.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/update-hdbstudio-deliveryunit.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/detect-newdb-studio.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/newdb-studio-repository-postupdate-v2.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/detect-newdb-client.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/update-sda-v2.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/detect-newdb-server.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/find-java-executable.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/newdb-studio-repository-postupdate.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/detect-hdb-plugin-v2.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/install-newdb-studio.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/update-newdb-studio-repository-v2.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/detect-load-controller.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/update-newdb-client-v2.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/uninstall-newdb-client-v3.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/change-newdb-client-installation-path-v2.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/update-newdb-studio-repository-v3.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/updatehostagent-v2.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/install-newdb-studio-v3.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/find-java-executable-v2.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/install-newdb-studio-repository.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/updatehostagent.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/update-newdb-server-v2.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/uninstall-newdb-client.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/detect-load-controller-v2.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/exists-path.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/gen-hdbstudio-deliveryunit.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/change-newdb-studio-repository-installation-path-v2.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/update-newdb-server-nzdm.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/detect-hdb-plugin.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/update-newdb-server.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/detect-newdb-installation-number.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/update-load-controller.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/update-hdb-plugin-v2.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/detect-newdb-installation-number-v2.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/update-hdb-plugin-v3.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/detect-newdb-server-v2.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/updatehostagent-v3.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/uninstall-newdb-studio-repository.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/uninstall-newdb-studio-repository-v2.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/detect-hostagent-v2.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/detect-hostagent.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/find-hdbeuspack.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/update-newdb-client.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/uninstall-newdb-studio-v3.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/update-newdb-server-v3.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/install-newdb-client-v2.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/detect-newdb-studio-v2.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/chmod-file.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/install-newdb-client.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/find-java-home.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/uninstall-newdb-studio.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/detect-sedm.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/install-newdb-studio-repository-v3.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/exists-path-v2.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/update-newdb-client-v3.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/uninstall-newdb-studio-v2.conf] with signature /usr/sap/hlm_bootstraps/HNB/HLM/SIGNATURE.SMF on host .
    INFO 2014-05-08 16:05:16 com.sap.lm.services.hostcontrol.SAPHostControlService
    Deployed Host Agent configurations [/usr/sap/hlm_bootstraps/HNB/HLM/operations.d/update-hdb-plugin.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/update-newdb-studio-repository.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/detect-newdb-client-v2.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/detect-sedm-v2.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/install-newdb-studio-repository-v2.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/find-java-home-v2.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/install-newdb-client-v3.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/update-load-controller-v2.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/detect-sda-v2.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/uninstall-newdb-client-v2.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/install-newdb-studio-v2.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/update-hdbstudio-deliveryunit.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/detect-newdb-studio.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/newdb-studio-repository-postupdate-v2.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/detect-newdb-client.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/update-sda-v2.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/detect-newdb-server.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/find-java-executable.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/newdb-studio-repository-postupdate.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/detect-hdb-plugin-v2.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/install-newdb-studio.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/update-newdb-studio-repository-v2.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/detect-load-controller.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/update-newdb-client-v2.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/uninstall-newdb-client-v3.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/change-newdb-client-installation-path-v2.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/update-newdb-studio-repository-v3.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/updatehostagent-v2.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/install-newdb-studio-v3.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/find-java-executable-v2.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/install-newdb-studio-repository.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/updatehostagent.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/update-newdb-server-v2.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/uninstall-newdb-client.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/detect-load-controller-v2.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/exists-path.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/gen-hdbstudio-deliveryunit.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/change-newdb-studio-repository-installation-path-v2.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/update-newdb-server-nzdm.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/detect-hdb-plugin.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/update-newdb-server.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/detect-newdb-installation-number.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/update-load-controller.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/update-hdb-plugin-v2.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/detect-newdb-installation-number-v2.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/update-hdb-plugin-v3.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/detect-newdb-server-v2.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/updatehostagent-v3.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/uninstall-newdb-studio-repository.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/uninstall-newdb-studio-repository-v2.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/detect-hostagent-v2.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/detect-hostagent.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/find-hdbeuspack.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/update-newdb-client.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/uninstall-newdb-studio-v3.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/update-newdb-server-v3.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/install-newdb-client-v2.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/detect-newdb-studio-v2.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/chmod-file.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/install-newdb-client.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/find-java-home.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/uninstall-newdb-studio.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/detect-sedm.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/install-newdb-studio-repository-v3.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/exists-path-v2.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/update-newdb-client-v3.conf, /usr/sap/hlm_bootstraps/HNB/HLM/operations.d/uninstall-newdb-studio-v2.conf] with signature /usr/sap/hlm_bootstraps/HNB/HLM/SIGNATURE.SMF on host .
    ERROR 2014-05-08 16:05:16 com.sap.lm.hana.hlm.update.slpp.task.AbstractUpdateProcessExecutor
    Process executor failed
    java.lang.IllegalArgumentException: null or empty argument
      at com.sap.lm.hlm.common.runtime.HlmRuntime.assertNotNullOrEmptyArgumens(HlmRuntime.java:342)
      at com.sap.lm.hlm.common.runtime.HlmRuntime.deployHlmExecutableScripts(HlmRuntime.java:74)
      at com.sap.lm.hlm.common.runtime.HlmRuntime.deployHlmExecutableScripts(HlmRuntime.java:69)
      at com.sap.lm.hana.hlm.update.slpp.task.deployconfig.AbstractDeployConfigProcessExecutor.deployconfigurations(AbstractDeployConfigProcessExecutor.java:114)
      at com.sap.lm.hana.hlm.update.slpp.task.deployconfig.DeployConfigWithSidAdmProcessExecutor.executeInternal(DeployConfigWithSidAdmProcessExecutor.java:42)
      at com.sap.lm.hlm.common.tasks.process.AbstractProcessExecutor.startInterruptibleExecution(AbstractProcessExecutor.java:128)
      at com.sap.lm.hlm.common.tasks.process.AbstractProcessExecutor$1.run(AbstractProcessExecutor.java:108)
    ERROR 2014-05-08 16:05:16 com.sap.lm.hana.hlm.update.slpp.task.AbstractUpdateProcessExecutor
    Process executor failed
    java.lang.IllegalArgumentException: null or empty argument
      at com.sap.lm.hlm.common.runtime.HlmRuntime.assertNotNullOrEmptyArgumens(HlmRuntime.java:342)
      at com.sap.lm.hlm.common.runtime.HlmRuntime.deployHlmExecutableScripts(HlmRuntime.java:74)
      at com.sap.lm.hlm.common.runtime.HlmRuntime.deployHlmExecutableScripts(HlmRuntime.java:69)
      at com.sap.lm.hana.hlm.update.slpp.task.deployconfig.AbstractDeployConfigProcessExecutor.deployconfigurations(AbstractDeployConfigProcessExecutor.java:114)
      at com.sap.lm.hana.hlm.update.slpp.task.deployconfig.DeployConfigWithSidAdmProcessExecutor.executeInternal(DeployConfigWithSidAdmProcessExecutor.java:42)
      at com.sap.lm.hlm.common.tasks.process.AbstractProcessExecutor.startInterruptibleExecution(AbstractProcessExecutor.java:128)
      at com.sap.lm.hlm.common.tasks.process.AbstractProcessExecutor$1.run(AbstractProcessExecutor.java:108)
    ERROR 2014-05-08 16:05:16 com.sap.lm.hlm.common.wizard.process.WizardProcessExecutor
    Execution of subtask with ID [6cd61e09-eb68-4448-86c0-b4319abbdc3f_DeployConfigWithSidAdmTask, Execution of 'Deploys SAP Host Agent configurations using sidadm credentials' failed.] has failed: {}
    ERROR 2014-05-08 16:05:16 com.sap.lm.hlm.common.wizard.process.WizardProcessExecutor
    Execution of subtask with ID [6cd61e09-eb68-4448-86c0-b4319abbdc3f_DeployConfigWithSidAdmTask, Execution of 'Deploys SAP Host Agent configurations using sidadm credentials' failed.] has failed: {}
    Could you please help us with this issue?
    Kind Regards,
    Message was edited by: Tom Flanagan

    Hi Alston,
    I'm sorry for the late reply. Are you still experiencing this error?
    I've seen this issue before with another customer and the final resolution was to make sure the /etc/hosts file does not have the ipv6 BEFORE ipv4. Here is an example:
    >> cat /etc/hosts
    # special IPv6 addresses
    ::1             localhost ipv6-localhost
    ipv6-loopback
    ff02::3         ipv6-allhosts
    192.168.180.31  abceccd01.sap.com abceccd01
    192.168.180.34  abceccs01.sap.com abceccs01
    192.168.180.35  abccrms01.sap.com abccrms01
    192.168.180.30  abceccs01.sap.com abceccs01
    10.36.10.5      abceccs01-nfs.sap.com  abceccs01-nfs
    The resolution would be to change the ordering. So the IPv6 section appears below the IPv4 section.
    After that is done, perform the following to "reset" HLM.
    1. Stop all browsers that have HLM pages open
    2. Stop the Studio
    3. Execute /usr/sap/hlm_bootstraps/<SID>/HLM/stop-hlm.sh –f
    4. Check that there are no any left HLM processes
    5. Go to /usr/sap/hlm_bootstraps/<SID>/HLM/param/
    and rename all files except logging.properties
    6. go to directory: /usr/sap/hlm_bootstraps/<SID>/HLM
    and rename directory persistence
    7 restart SAP Host Agent - as root: /usr/sap/hostctrl/exe/saphostexec
    -restart
    8. open HLM ui via browser:
    https://<hostname>:1129/lmsl/HLM/<SID>/ui/
    I hope this helps.
    Best Regards,
    Jimmy

  • Switch over between two SAP PI systems for downtime minimization

    Hello Colleagues,
    with our interfaces over our SAP PI 7.31 (ABAP/Java) system we assume we will run in a 7x24 h runtime scenario in the future.
    Regarding Business Continuity we have to think about solutions which help us to handle downtimes greater than 15 min. regarding Support Package upgrade, Kernel update, EHP, etc.
    The first idea is to implement a second equal SAP PI productive system in parallel to the existing one.
    On the sender side a switch over implementation like WebDispatcher, Load Balancer, etc.
    For maintenance all Interface traffic can run over PI Nr. 1 and PI Nr. 2 can be updated.
    Afterward all interfaces will switched to PI Nr. 2 and PI Nr. 1 can go in maintenance.
    Could be this as suitable solution for SAP PI Business Continuity or do you know better solutions?
    Many thanks in advance!
    Regards,
    Jochen

    Hello Bernhard, Hello Holger,
    many thanks for reply and providing these valuable information's.
    The nZDM Concept is already known to me but it doesn’t answer all our questions.
    Please let me explain a little more in detail.
    Not currently but in the near future we assume some new interface over our SAP PI System will come with the requirement max. downtime lower thank 10 to 15 min. only allowed.
    To be prepared regarding this possible scenario, we start thinking about possible different solutions.
    First step was the nZDM Concept, of course. But it didn’t meet all our requirements regarding interface downtime.
    Some points are:
    possible min. downtime is 30 min. and thus is over our requirements for interfaces
    only for Update (and planed for Upgrade) the SAP PI application
    all operating system and database related maintenance tasks are not covered by nZDM
    all Hardware (Server, Storage, etc.) as well not covered by nZDM
    Among others, because of these facts we start thinking about a second equal SAP PI system beside to existing productive one.
    Than line 1 will take over the whole interface traffic and in the meantime the line 2 can go in maintenance. After finalizing the maintenance for SAP PI Nr. 2 we can switch the interface traffic to SAP PI Nr. 2 to get SAP PI Nr. 1 free for maintenance.
    Regarding the topic “PI Federation” I found here in these documentation's several hints regarding this scenario (two SAP PI systems in an switch over scenario).
    PI Federation – An Overview
    among others  Page: 27
    Business Continuity: Central PI integration Server with redundant Integration Server to be used in controlled switch over scenarios when upgrading or patching.
    or
    How to Fast-Switch Integration Scenarios between SAP PI Runtimes Part II: Web Dispatcher
    But I didn’t found any further detail documentation's regarding this approach.
    The solution should fit as well to our existing hardware infrastructure.
    For production we use an IBM (AIX) failover-cluster switch between our both data center.
    Regarding our hardware infrastructure prerequisites and downtime requirements, which solution(s) do you recommend? Is PI Federation still an option?
    Many thanks in advance!
    Regards,
    Jochen

  • RFC Send could not be resolved against SAP system because its metadata could not be obtained...EXCEPTION FU_NOT_FOUND RAISED

    Hello,
    I am getting the following error in sending IDOC to SAP via WCF-SAP adapter in BizTalk Server 2009. I have the SOAP header in the adapter mentioned below. Also, wondering what is the convension for Action URL? Is it always "http://Microsoft.LobServices.Sap/2007/03/Rfc/"
    + Operation name mentioned in the Orchestration? I would appreciate if anyone could help me resolve this error.
    The adapter failed to transmit message going to send port "SendReceive_PO_IDOC_TO_SAP" with URL "sap://CLIENT=111;LANG=EN;@a/123.456.789.101/00?GWHOST=123.456.789.101&GWSERV=sapgw00&ListenerProgramId=ABCDEF111&RfcSdkTrace=False&AbapDebug=False".
    It will be retransmitted after the retry interval specified for this Send Port. Details:"Microsoft.ServiceModel.Channels.Common.MetadataException: RFC Send could not be resolved against SAP system because its metadata could not be obtained. ---> Microsoft.Adapters.SAP.RFCException:
    Details: ErrorCode=RFC_EXCEPTION. ErrorGroup=RFC_ERROR_APPLICATION_EXCEPTION. SapErrorMessage=EXCEPTION FU_NOT_FOUND RAISED.  AdapterErrorMessage=An error occurred while determining the function interface of the RFC Send.
       at Microsoft.Adapters.SAP.RFCException.HelperThrow(Int32 retCode, String additionalErrorMessage)
       at Microsoft.Adapters.SAP.RfcClientConnection.GetRfcFunctionInterface(String rfcName)
       at Microsoft.Adapters.SAP.InternalRfcMetadata..ctor(String originalRfcName, SAPConnection sapConnection)
       at Microsoft.Adapters.SAP.SAPMetadataContract.ResolveOperationMetadata(String operationId, TimeSpan timeout, TypeMetadataCollection& extraTypeMetadataResolved)
       at Microsoft.ServiceModel.Channels.Common.Design.MetadataCache.GetOperationMetadata(String uniqueId, Guid clientId, TimeSpan timeout)
       at Microsoft.ServiceModel.Channels.Common.MetadataLookup.GetOperationDefinition(String operationId, TimeSpan timeout)
       at Microsoft.Adapters.SAP.SapFunctionMetadata.ResolveOperationMetadataUsingSdk(String absoluteName, String displayName, String funcName, String operationNamespace, SAPConnection sapConnection, Boolean isTrfc, MetadataLookup metadataLookup, TimeoutHelper
    timeoutHelper)
       --- End of inner exception stack trace ---
    Server stack trace: 
       at System.ServiceModel.AsyncResult.End[TAsyncResult](IAsyncResult result)
       at System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.End(SendAsyncResult result)
       at System.ServiceModel.Channels.ServiceChannel.EndCall(String action, Object[] outs, IAsyncResult result)
       at System.ServiceModel.Channels.ServiceChannel.EndRequest(IAsyncResult result)
    Exception rethrown at [0]: 
       at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
       at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
       at System.ServiceModel.Channels.IRequestChannel.EndRequest(IAsyncResult result)
       at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.RequestCallback(IAsyncResult result)".
    For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
    SOAP Header:
    <BtsActionMapping xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <Operation Name="Send" Action="http://Microsoft.LobServices.Sap/2007/03/Rfc/Send" />
    </BtsActionMapping>
    Thanks,
    Tarun

    Hello Morten,
    The Send is actually just the name of the operation in Orchestration and it does not exist in SAP. Hence, do I really need to have the SOAP header in WCF-SAP adapter or can I send the IDOC without any SOAP header info? When I try to send without
    SOAP header I get the following error. Can you help me resolve this?
    The adapter failed to transmit message going to send port "SendReceive_PO_IDOC_TO_SAP" with URL "sap://CLIENT=111;LANG=EN;@a/123.456.789.101/00?GWHOST=123.456.789.101&GWSERV=sapgw00&ListenerProgramId=ABCDEF111&RfcSdkTrace=False&AbapDebug=False". It
    will be retransmitted after the retry interval specified for this Send Port.  Details:"System.ArgumentNullException: Value cannot be null.
    Parameter name: key
       at System.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
       at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
       at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.CreateChannelFactory[TChannel](IBaseMessage bizTalkMessage)
       at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.InitializeValues(IBaseMessage message)
       at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2..ctor(IBaseMessage message, WcfTransmitter`2 transmitter)
       at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfTransmitter`2.GetClientFromCache(String spid, IBaseMessage message)
       at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfAsyncBatch`2.BatchWorker(List`1 messages)".
    For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
    Thanks,
    Tarun

Maybe you are looking for