Page break between line items and address in invoice

Hi Team,
I am getting a Page beak problem between line items in an invoice.
If i have 10line items which needs to be displayed in the output all are displayed in 3 pages. but my problem is when displaying the line item details in any page it should be fully displayed on the same page else it should go to the next page for display.
Each line details needs to be printed on same page only (currenty Items and adresses are split up in different pages. ).
Please let us know how can i solve this.
Thank you for your help.
Best Regards,
Kumar.

Hi Karthik,
Thank you for your answer.
I have already done creating a folder and grouped the text elements as you have suggested in Mainwindow. I guess my explanation on my issue is not clear.
Actaully after printing the number of line items in an order we are printing the Certificate recevier details as a last row which is now having the problem, and it is getting truncated into two parts when enough space is not there to print on the same page.
If i make the text element related to the  Certificate receiver properties to Page protection will it work ? i will try this option now..
Mean while any suggestion on this regard is welcome.
Thanks alot for your help.
Best Regards,
Kumar.

Similar Messages

  • No page break between table header and first line of the table main area

    Hi all.
    I'm printing a form which contains a lot of tables. Sometimes while printing the table header line remains at the bootom of  the page and the lines of internal table are printed on the next page (also with header because i have marked 'at page break' in the header). How is it possible not to break header line of 'Table'-node and the first line of internal table?
    Regards, Nikolai.

    Hello Niki,
    try to use page protection......
    create a folder and place the text that r to be displayed without break.........
    and check the checkbox page protection.
    I think you cannot put an entire table in a folder & turn "Page Protection" on simultaneously.
    Any ideas?
    BR,
    Suhas

  • Smartforms: no page break between last line item and footer in table?

    Hello All,
    my smartform has FIRST and NEXT pages. I would like to avoid a page break between last item line of a table in MAIN window and the footer of the same table.
    Here is how it looks currently.
    Output of FIRST page, MAIN window, table ITEMS:
    1.line item
    2.line item
    3.line item
    4.line item
    page break
    output of NEXT page, MAIN window, table ITEMS:
    1.footer line
    2.footer line
    I would like that if a footer does not fit on FIRST page, it would be displayed on NEXT page with last item line.
    It should be like this:
    output of FIRST page, MAIN window, table ITEMS
    1.line item
    2.line item
    3.line item
    page break
    output of NEXT page, MAIN window, table ITEMS
    4.line item
    1.footer line
    2.footer line
    Any ideas?
    Thanks and best regards,
    Mindaugas

    Do you mean line item text or your want to print footer text?
    If your trying yo display some footer text, then you either place a footer window or you can create a table inside your main window and place text under the footer of the table, then it will display the text without any page break.
    If it is item tem.
    Then you need to build additional logic. As we cannot guess, the total number of item text upfront.
    Example: if page1 can hold 15 line items, check whether your header and item can fit in page one else call a new page by placing a condition FLAG = "X".
    I hope it will help you to solve your problem.
    Regards,
    SaiRam

  • Line Item and Transaction Figures

    Hi experts,
    What is the difference between line items and transaction figures ?
    I have gone through a document which specifies for Line items GL AR AP, it picks data respectively frm tables BSEG/BKPF, BSAD/BSID, BSAK/BSIK and for transaction figures GLT0/GLFUNCT, KNC1/KNC3, LFC1/LFC3.
    What data 0FI_XX_6 fetches into BI when compared with 0FI_XX_4 ?
    Please clarify.
    Regards,
    Bhadri M.

    Hi,
    What are Transaction Figures :
    Transaction figures are the sums of line items on the debit or credit side. The balance is the
    difference between the debit and the credit transaction figure.
    What is  line items :
    Line items are document items that were posted to a specific account. In contrast to a document item a line item only contains the information from the document that is relevant from the account view.
    You can display the following line items:
    Open items Cleared items Noted items Parked items Items with special G/L transactions (in Accounts Receivable and Accounts Payable)
    Items with customer or vendor items (in Accounts Receivable and Accounts Payable)
    You can display the line items for the following account types:
    Customer accounts
    Vendor accounts
    G/L accounts
    Point No 1:
    0FI_XX_6 : Transaction Figures:
    http://help.sap.com/saphelp_nw04/helpdata/en/41/4b73415fb9157de10000000a155106/content.htm
    0FI_XX_4: Line-Item
    http://help.sap.com/saphelp_bw33/helpdata/en/af/16533bbb15b762e10000000a114084/content.htm
    Regards
    Ram.
    Edited by: Ramakanth Deepak Gandepalli on Dec 22, 2009 10:46 AM

  • Line item and summary settlement in AUC

    Hi
    What is the difference between line item and summary settlement with reagrds to AUC,In what cases they are going to be used ,can any one provide me some examples.
    Thanks
    Lily

    Hi,
    In WBS, there would be n number of line items in the Investment Projects.
    So while doing settlement for those, we can decide whether to do on WBS based or Line items based.
    These settings will be done by CO people.
    Regards,
    Maheswaran.

  • Need to skip page break between header and Detail sections

    Hello,
    I am combining two reports in one report (one in header section and another report in the body section). when this report is run, there's a page break between these two sections. Is it possible to eliminate it? Ideally I would like the detail section to start as soon as the header section of the report is completed in the same page instead of starting (detail section report) in a new page.
    Any help is highly appreciated. Thanks,
    Sundar

    I'd put them into one section to control the breaks.

  • Relation between Invoice Line items and Accounting Line item

    Dear All,
    My requirement is to print all the invoice documents and it's tax values like cenvat, Ecess, BED and VAT.
    I have to fetch these tax details from BSEG table .
    I' am getting Invoice number ( RBKP-BELNR ) from BKPF-AWTKEY .
    Can any one please tell me how to relate the Invoice line items and Accounting document line items..
    Any BAPI or FM is there to retrieve these data.
    Please do needful in this regard.

    Hi,
    from table bseg - field Koart
    K = Vendor
    D = Customer
    S = G/L account here tax lines identify with buzid = T
    or take table bset for taxes
    Andreas

  • Spaces in between line items in script

    Hi ,
    In script forms my problem is like this, when iam printing page with 2 line items(line items are in main window) ,
    the totals and subtotals at the bottom are displaying perfectly( sub totals are given in footer window).
    If line items are increased more , than the subtotals part is printing in second page.
    In form here for first line item they are printing some  (16,4,2,1'%') calculations in 4 sub lines,
    For remaining line items there is no calculations(i.e., the loop is entering for calculations but as per one condition
    in print program that calculations are becoming blank , on this reason the space is coming for remaining line items which is not required ).
    Now my requirement is i have to reduce the space between 2nd and 3rd line item. Please help me in this
    Print program
                          TABLE DECLARATION                        *
    TABLES: /ivl/zmb_bealo,    "Bill of Entry Item allocation
            /ivl/zmb_becdat,   "Bill of Entry Company Level Data
            /ivl/zmb_behdr,    "Bill of entry Header
            /ivl/zmb_beitm,    "Bill of Entry item
            /ivl/zmb_beref,    "Reference for Bill of Entry
            /ivl/zcm_codmas,   "Code Master Table
            /ivl/zmb_bndmas,
            /ivl/zmb_tarnt,
            zvincust,
            dd07l,             "R/3 DD: values for the domains
            dd07t,             "DD: Texts for Domain Fixed
            dd07v,             "View on fixed values and domain texts
            t005t,             "Country Names
            kna1,              "Customer Master
            t001,              "Company Codes
            LTAK,
            LTAP,             "Transfer order item    "$05
            VBPA.             "Sales Document Partner "$05
                         SELECTION-SCREEN                         *
    PARAMETERS: tonumber LIKE /ivl/zmb_behdr-zztono OBLIGATORY,
                p_lgnum type lgnum obligatory.
    select-options: s_lgnum for LTAK-lgnum no-display.
                          End Of Selection                        *
    DATA  wrk_bukrs LIKE /ivl/zmb_behdr-bukrs .
    DATA  wrk_mode(8).
    DATA sum_totdty1(75).
    DATA sum_totdty2(75).
    Modification - Changed data type of variable from CHAR to INT
    *ATA count(2)  VALUE 0 .
    DATA : count TYPE i.
                  Internal table declaration                      *
    DATA: BEGIN OF it_behdr OCCURS 0 ,
           docno LIKE /ivl/zmb_behdr-docno,
           bondno LIKE /ivl/zmb_behdr-bondno,
           bonddat LIKE /ivl/zmb_behdr-bonddat,
           docyear LIKE /ivl/zmb_behdr-docyear,
           zzchanumber LIKE /ivl/zmb_behdr-zzchanumber,
           doctype LIKE /ivl/zmb_behdr-doctype,
           vessname LIKE /ivl/zmb_behdr-vessname,
           rotno LIKE /ivl/zmb_behdr-rotno,
           rotdt LIKE /ivl/zmb_behdr-rotdt,
           portship LIKE /ivl/zmb_behdr-portship,
           orgcntry LIKE /ivl/zmb_behdr-orgcntry,
           modtran LIKE /ivl/zmb_behdr-modtran,
           concntry LIKE /ivl/zmb_behdr-concntry,
           impdpsno LIKE /ivl/zmb_behdr-impdpsno,
           impdpdat LIKE /ivl/zmb_behdr-impdpdat,
           zzkunnr LIKE /ivl/zmb_behdr-zzkunnr,
           pdocno LIKE /ivl/zmb_behdr-pdocno,
           pdocyear LIKE /ivl/zmb_behdr-pdocyear,
           arivport LIKE /ivl/zmb_behdr-arivport,
           zztono LIKE /ivl/zmb_behdr-zztono,
           bukrs  LIKE /ivl/zmb_behdr-bukrs,
           linno LIKE  /ivl/zmb_beref-linno,
           ablno  LIKE /ivl/zmb_beref-ablno,
           abldat LIKE /ivl/zmb_beref-abldat,
           loadport LIKE /ivl/zmb_behdr-loadport,
           orgicnty(15),
           conscnty(15),
           portdesc(15),
           portcode LIKE /ivl/zcm_codmas-coddesc,
           coddesc LIKE /ivl/zcm_codmas-coddesc,
           notinum1 LIKE zvincust-notinum1,
    *Begin of modification for change $01
         descs1 like /ivl/zmb_tarnt,
          descs1 LIKE /ivl/zmb_tarnt-descs,
    *End of modification for change $01
           dsirregno LIKE zvincust-dsirregno,
           iecode1 LIKE zvincust-iecode,
           iecode LIKE zvincust-iecode,
           iecdesc(15),
           zzintrst LIKE /ivl/zmb_behdr-zzintrst,
           bondregnno LIKE /ivl/zmb_bndmas-bondregnno,
           bondstadat LIKE /ivl/zmb_bndmas-bondstadat,
           bondenddat LIKE /ivl/zmb_bndmas-bondenddat,
           expdt1 LIKE /ivl/zmb_bndmas-expdt1,
           expdt2 LIKE /ivl/zmb_bndmas-expdt2 ,
           name1  LIKE kna1-name1,
           name2  LIKE kna1-name2,
           ort01  LIKE kna1-ort01,
           pstl2  LIKE kna1-pstl2,
           telfx  LIKE kna1-telfx,
           coname LIKE t005t-landx,
           count(3) TYPE n VALUE 0,
           kunnr  LIKE VBPA-kunnr,
       END OF it_behdr.
    DATA : it_behdr1 LIKE it_behdr OCCURS 0 WITH HEADER LINE.
    DATA : zdocno LIKE it_behdr-docno.
    DATA : BEGIN OF it_bndmas OCCURS 0,
           bondregnno LIKE /ivl/zmb_bndmas-bondregnno,
           bondstadat LIKE /ivl/zmb_bndmas-bondstadat,
           bondenddat LIKE /ivl/zmb_bndmas-bondenddat,
           expdt1 LIKE /ivl/zmb_bndmas-expdt1,
           expdt2 LIKE /ivl/zmb_bndmas-expdt2 ,
    END OF it_bndmas.
    DATA spellamt LIKE spell.
    DATA: BEGIN OF it_beitm OCCURS 0 ,
              cthno  LIKE /ivl/zmb_beitm-cthno,
              matnr  LIKE /ivl/zmb_beitm-matnr,
              matldes LIKE /ivl/zmb_beitm-matldes,
              waers1  LIKE /ivl/zmb_beitm-waers1,
              netpr   LIKE /ivl/zmb_beitm-netpr,
              wkurs1  LIKE /ivl/zmb_beitm-wkurs1,
              wkurs2  LIKE /ivl/zmb_beitm-wkurs2,
              wkurs3  LIKE /ivl/zmb_beitm-wkurs3,
              frgtamt LIKE /ivl/zmb_beitm-frgtamt,
              insuamt LIKE /ivl/zmb_beitm-insuamt,
              agcomm  LIKE /ivl/zmb_beitm-agcomm,
              misschat LIKE /ivl/zmb_beitm-misschar,
              landchar LIKE /ivl/zmb_beitm-landchar,
              totval  LIKE /ivl/zmb_beitm-totval,
              assval  LIKE /ivl/zmb_beitm-assval,
              sysassval LIKE /ivl/zmb_beitm-sysassval,
              menge   LIKE /ivl/zmb_beitm-menge,
              meins   LIKE /ivl/zmb_beitm-meins,
              zzcetno LIKE /ivl/zmb_beitm-zzcetno,
              docno   LIKE /ivl/zmb_beitm-docno,
              doctype LIKE /ivl/zmb_beitm-doctype,
              docyear LIKE /ivl/zmb_beitm-docyear,
              boeitno LIKE /ivl/zmb_beitm-boeitno,
              bcdrt LIKE /ivl/zmb_bealo-bcdrate,
              bcdamt LIKE /ivl/zmb_bealo-bcdvalu,
              acdrt LIKE /ivl/zmb_bealo-acdrate,
              acdamt LIKE /ivl/zmb_bealo-acdvalu,
              sum911 LIKE /ivl/zmb_bealo-acdvalu,
              dutyrat LIKE /ivl/zmb_bedut-dutyrat,
              dutcode LIKE /ivl/zmb_bedut-dutcode,
              dutcodebcd LIKE /ivl/zmb_bedut-dutcode,
              dutcodecvd LIKE /ivl/zmb_bedut-dutcode,
              dutcodesad LIKE /ivl/zmb_bedut-dutcode,
              dutyratbcd LIKE /ivl/zmb_bedut-dutyrat,
              dutyratcvd LIKE /ivl/zmb_bedut-dutyrat,
              dutyratsad LIKE /ivl/zmb_bedut-dutyrat,
              sysvalubcd LIKE /ivl/zmb_bedut-sysvalu,
              sysvalucvd LIKE /ivl/zmb_bedut-sysvalu,
              sysvalusad LIKE /ivl/zmb_bedut-sysvalu,
              cetno LIKE /ivl/zmb_tarnt-cetno,
              descs LIKE /ivl/zmb_tarnt-descs,
              totassval   LIKE  /ivl/zmb_beitm-assval,
              sad LIKE /ivl/zmb_bedut-dutcode  VALUE 'SAD',
              totsysvalubcd   LIKE /ivl/zmb_bedut-sysvalu,
              actvalu LIKE /ivl/zmb_bedut-actvalu,
              zbcdasstot LIKE /ivl/zmb_bedut-sysvalu,
              zdutyratcvd LIKE /ivl/zmb_bedut-sysvalu,
              zpcvdtot LIKE /ivl/zmb_bedut-sysvalu,
              ztotduty LIKE /ivl/zmb_bedut-sysvalu,
              zbatcvdtot LIKE /ivl/zmb_bedut-sysvalu,
              zdutyratsad LIKE /ivl/zmb_bedut-dutyrat,
              zsad LIKE /ivl/zmb_bedut-sysvalu,
              zpsadtot LIKE /ivl/zmb_bedut-sysvalu,
              dutyratcess LIKE /ivl/zmb_bedut-dutyrat, " for cess value $03
              sysvalucess LIKE /ivl/zmb_bedut-sysvalu,  " for cess value $03
              dutyratedc LIKE /ivl/zmb_bedut-dutyrat, " for cess value $03
              sysvaluedc LIKE /ivl/zmb_bedut-sysvalu,  " for cess value $03
              zpcesstot LIKE /ivl/zmb_bedut-sysvalu,
              zpedctot LIKE /ivl/zmb_bedut-sysvalu,
             zpsadtot LIKE /ivl/zmb_bedut-sysvalu,
              dutyrathcs LIKE /ivl/zmb_bedut-dutyrat, " for Higher Ed Cess  $04
              sysvaluhcs LIKE /ivl/zmb_bedut-sysvalu, " for Higher Ed Cess  $04
              zphcstot   LIKE /ivl/zmb_bedut-dutyrat, " for Higher Ed Cess  $04
              dutyrathdc LIKE /ivl/zmb_bedut-dutyrat, " for Higher Ed Cess  $04
              sysvaluhdc LIKE /ivl/zmb_bedut-sysvalu, " for Higher Ed Cess  $04
              zphdctot   LIKE /ivl/zmb_bedut-dutyrat, " for Higher Ed Cess  $04
    END OF it_beitm.
    DATA : BEGIN OF it_zbeitm OCCURS 0,
           cthno  LIKE /ivl/zmb_beitm-cthno,
           zbcdasstot LIKE /ivl/zmb_bedut-sysvalu,
           zdutyratcvd LIKE /ivl/zmb_bedut-sysvalu,
           zpcvdtot LIKE /ivl/zmb_bedut-sysvalu,
           ztotduty LIKE /ivl/zmb_bedut-sysvalu,
           zbatcvdtot LIKE /ivl/zmb_bedut-sysvalu,
           zdutyratsad LIKE /ivl/zmb_bedut-dutyrat,
           zpcesstot LIKE /ivl/zmb_bedut-sysvalu,
           zpedctot LIKE /ivl/zmb_bedut-sysvalu,
           zphcstot  LIKE /ivl/zmb_bedut-sysvalu,                   "$04
           zphdctot LIKE /ivl/zmb_bedut-sysvalu,                    "$04
           zsad LIKE /ivl/zmb_bedut-sysvalu,
           zpsadtot LIKE /ivl/zmb_bedut-sysvalu,
           dutyratcess LIKE /ivl/zmb_bedut-dutyrat, " for cess value $03
           sysvalucess LIKE /ivl/zmb_bedut-sysvalu,  " for cess value $03
           dutyratedc LIKE /ivl/zmb_bedut-dutyrat, " for cess value $03
           sysvaluedc LIKE /ivl/zmb_bedut-sysvalu,  " for cess value $03
           dutyrathcs LIKE /ivl/zmb_bedut-dutyrat, " Higher Ed Cess  $04
           sysvaluhcs LIKE /ivl/zmb_bedut-sysvalu, " Higher Ed Cess  $04
           dutyrathdc LIKE /ivl/zmb_bedut-dutyrat, " Higher Ed Cess  $04
           sysvaluhdc LIKE /ivl/zmb_bedut-sysvalu, " Higher Ed Cess  $04
    END OF it_zbeitm.
    DATA: BEGIN OF it_vbeln occurs 0,                      "$05
           wdno like ltap-vbeln,
    END OF it_vbeln.                                       "$05
    DATA : beitm LIKE it_beitm OCCURS 0 WITH HEADER LINE.
    DATA beitm1 LIKE it_beitm .
    DATA tot_duty LIKE /ivl/zmb_beitm-actdtypyd.
    DATA tot_duty1 LIKE /ivl/zmb_beitm-actdtypyd.
    DATA ind_tot LIKE /ivl/zmb_beitm-actdtypyd.
    DATA inv_tot LIKE /ivl/zmb_beitm-actdtypyd.
    DATA totalbcd  LIKE /ivl/zmb_bedut-sysvalu.
    DATA totalbcd1  LIKE /ivl/zmb_bedut-sysvalu.
    DATA item_duty LIKE /ivl/zmb_beitm-actdtypyd.
    DATA dutyratcvd  LIKE /ivl/zmb_bedut-dutyrat.
    DATA tot_dutysad LIKE /ivl/zmb_beitm-actdtypyd.
    DATA setamt LIKE /ivl/zmb_beitm-actdtypyd.
    DATA setamt1 LIKE /ivl/zmb_beitm-actdtypyd.
    DATA totassval1  LIKE  /ivl/zmb_beitm-assval.
    DATA pagetotal LIKE  /ivl/zmb_beitm-assval.
    DATA pagetotal1 LIKE  /ivl/zmb_beitm-assval.
    DATA pagetotal2 LIKE  /ivl/zmb_beitm-assval.
    DATA it_bedut LIKE /ivl/zmb_bedut OCCURS 0 WITH HEADER LINE.
    DATA dutyratcvd1  LIKE /ivl/zmb_bedut-dutyrat.
    DATA pagetotal11 LIKE  /ivl/zmb_beitm-assval.
    DATA setamt11 LIKE /ivl/zmb_beitm-actdtypyd.
    DATA totalbcd11 LIKE /ivl/zmb_bedut-sysvalu.
    DATA item_duty1 LIKE /ivl/zmb_beitm-actdtypyd.
    DATA cvdtotal LIKE /ivl/zmb_bedut-sysvalu.
    DATA cvdtotal1 LIKE /ivl/zmb_bedut-sysvalu.
    DATA sadtotal LIKE /ivl/zmb_bedut-sysvalu.
    DATA sadtotal1 LIKE /ivl/zmb_bedut-sysvalu.
    DATA netpr1    LIKE   /ivl/zmb_beitm-netpr.
    DATA netpr3    LIKE   /ivl/zmb_beitm-netpr.
    DATA insuamt1  LIKE /ivl/zmb_beitm-insuamt.
    DATA insuamt3  LIKE /ivl/zmb_beitm-insuamt.
    DATA frgtamt2  LIKE /ivl/zmb_beitm-frgtamt.
    DATA frgtamt1  LIKE /ivl/zmb_beitm-frgtamt.
    DATA frgtamt3  LIKE /ivl/zmb_beitm-frgtamt.
    DATA misschar1 LIKE /ivl/zmb_beitm-misschar.
    DATA landchar1 LIKE /ivl/zmb_beitm-landchar.
    DATA missland  LIKE /ivl/zmb_beitm-landchar.
    DATA totvalin1 LIKE /ivl/zmb_beitm-totval.
    DATA imptot  LIKE /ivl/zmb_beitm-sysassval.
    DATA saltot  LIKE /ivl/zmb_beitm-assval.
    DATA subtotduty LIKE /ivl/zmb_beitm-sysassval.
    DATA subamtbas LIKE /ivl/zmb_beitm-sysassval.
    DATA imptot1 LIKE /ivl/zmb_beitm-sysassval.
    DATA saltot1 LIKE /ivl/zmb_beitm-assval.
    DATA misccharge LIKE /ivl/zmb_beitm-misschar.
    DATA netpr2  LIKE   /ivl/zmb_beitm-netpr.
    DATA netpr4  LIKE   /ivl/zmb_beitm-netpr.
    DATA insuamt2   LIKE /ivl/zmb_beitm-insuamt.
    DATA misschar2  LIKE /ivl/zmb_beitm-misschar.
    DATA landchar2  LIKE /ivl/zmb_beitm-landchar.
    DATA totvalin2  LIKE /ivl/zmb_beitm-totval.
    DATA sysvalin2  LIKE /ivl/zmb_beitm-sysassval.
    DATA assvalin2  LIKE /ivl/zmb_beitm-sysassval.
    DATA pbcdtot LIKE  /ivl/zmb_beitm-sysassval.
    DATA passvaltot  LIKE /ivl/zmb_beitm-sysassval.
    DATA bcdasstot LIKE  /ivl/zmb_beitm-sysassval.
    DATA pcvdtot  LIKE  /ivl/zmb_beitm-sysassval.
    DATA totduty  LIKE  /ivl/zmb_beitm-sysassval.
    DATA totduty1  LIKE  /ivl/zmb_beitm-sysassval.
    DATA psadtot LIKE   /ivl/zmb_beitm-sysassval.
    DATA psadtot1 LIKE   /ivl/zmb_beitm-sysassval.
    DATA batcvdtot LIKE /ivl/zmb_beitm-sysassval.
    DATA dutypaid1  LIKE /ivl/zmb_beitm-sysassval.
    DATA dutypaid  LIKE  /ivl/zmb_beitm-sysassval.
    DATA intrs     LIKE  /ivl/zmb_beitm-sysassval.
    DATA var1 LIKE  /ivl/zmb_beitm-sysassval.
    DATA var2 LIKE  /ivl/zmb_beitm-sysassval.
    DATA var3 LIKE  /ivl/zmb_beitm-sysassval.
    DATA var4 LIKE  /ivl/zmb_beitm-sysassval.
    DATA var5 LIKE  /ivl/zmb_beitm-sysassval.
    DATA var6 LIKE  /ivl/zmb_bedut-dutyrat.
    DATA var7 LIKE  /ivl/zmb_bedut-sysvalu.
    DATA var8 LIKE  /ivl/zmb_beitm-sysassval.
    insert on 120704 for education cess  $03
    DATA var9 LIKE  /ivl/zmb_beitm-sysassval. "/ivl/zmb_bedut-dutyrat.
    DATA var10 TYPE p DECIMALS 2.  "ike /ivl/zmb_beitm-sysassval.
    DATA var11 LIKE /ivl/zmb_beitm-sysassval. "/ivl/zmb_bedut-dutyrat.
    DATA var12 LIKE /ivl/zmb_beitm-sysassval.
    DATA var13 TYPE p DECIMALS 2.  "like /ivl/zmb_beitm-sysassval.
    DATA var14 LIKE /ivl/zmb_beitm-sysassval.
    DATA pcestot LIKE  /ivl/zmb_beitm-sysassval.
    DATA pcestot1 LIKE  /ivl/zmb_beitm-sysassval.
    DATA pedctot LIKE  /ivl/zmb_beitm-sysassval.
    DATA pedctot1 LIKE  /ivl/zmb_beitm-sysassval.
    end of insert on 120704 for education cess  $03
    DATA dutyratsad LIKE /ivl/zmb_bedut-dutyrat.
    DATA sysvalusad LIKE /ivl/zmb_bedut-sysvalu.
    DATA sad(4) TYPE c VALUE 'SAD'.
    DATA pgtotal LIKE t001r_bf-amount.
    DATA : var15    like /ivl/zmb_beitm-sysassval,                   "$04
           var16    TYPE p DECIMALS 2,                               "$04
           var17    LIKE /ivl/zmb_beitm-sysassval,                   "$04
           var18    LIKE /ivl/zmb_beitm-sysassval,                   "$04
           var19    TYPE p DECIMALS 2,                               "$04
           var20    LIKE /ivl/zmb_beitm-sysassval,                   "$04
           var21    TYPE p DECIMALS 2,                               "$04
           var22    TYPE p DECIMALS 2,                               "$04
           phcstot  LIKE /ivl/zmb_beitm-sysassval,                   "$04
           phcstot1 LIKE /ivl/zmb_beitm-sysassval,                   "$04
           phdctot  LIKE /ivl/zmb_beitm-sysassval,                   "$04
           phdctot1 LIKE /ivl/zmb_beitm-sysassval.                   "$04
    DATA :   w_cname1 LIKE adrc-name1,
               w_cname2 LIKE adrc-name2,
               w_cname3 LIKE adrc-name3,
               w_cstreet LIKE adrc-street,
               w_chouse_num1 LIKE adrc-house_num1,
               w_cstr_suppl1 LIKE adrc-str_suppl1,
               w_cstr_suppl2 LIKE adrc-str_suppl1,
               w_ccity1 LIKE adrc-city1,
               w_cregion LIKE adrc-region,
               w_ccountry LIKE adrc-country,
               w_cpost_code1 LIKE adrc-post_code1,
               w_cpo_box LIKE adrc-po_box,
               w_ctel_number LIKE adrc-tel_number,
               w_cfax_number LIKE adrc-fax_number,
               w_cname4 LIKE adrc-name1,                              "$05
               w_cname5 LIKE adrc-name2,                              "$05
               w_cname6 LIKE adrc-name3,                              "$05
               w_cstreet1 LIKE adrc-street,                           "$05
               w_chouse_num2 LIKE adrc-house_num1,                    "$05
               w_cstr_suppl3 LIKE adrc-str_suppl1,                    "$05
               w_cstr_suppl4 LIKE adrc-str_suppl1,                    "$05
               w_ccity2 LIKE adrc-city1,                              "$05
               w_cregion1 LIKE adrc-region,                           "$05
               w_ccountry1 LIKE adrc-country,                         "$05
               w_cpost_code2 LIKE adrc-post_code1,                    "$05
               w_cpo_box1 LIKE adrc-po_box,                           "$05
               w_ctel_number1 LIKE adrc-tel_number,                   "$05
               w_cfax_number1 LIKE adrc-fax_number.                   "$05
    DATA : addr LIKE lfa1-adrnr,
           w_ccountry_text LIKE t005t-landx.
    DATA : cthno1 LIKE it_beitm-cthno,
           cthno2 LIKE it_beitm-cthno,
           bonddat1 LIKE sy-datum.
    data:  W_PLADDR     TYPE WISO_PLADDR.
    DATA: w_lgnum    type lgnum.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR tonumber.
    AT SELECTION-SCREEN.
      clear w_lgnum.
      SELECT single lgnum
             into w_lgnum
             FROM  ltak
             WHERE  lgnum  = p_lgnum
             AND    tanum  = tonumber.
      IF SY-SUBRC <> 0.
        MESSAGE E000 WITH 'Invalid TO number '
                          tonumber
                          ' in warehouse '
                          p_lgnum.
      ENDIF.
                     Start of Selection                                  *
    START-OF-SELECTION .
      perform f_read_address using tonumber.
      PERFORM write_header1.
      PERFORM item_print.
    END-OF-SELECTION.
                     Form  WRITE_HEADER1
    FORM write_header1.
      CLEAR it_behdr.
      REFRESH it_behdr.
      SELECT a~bondno a~bonddat a~docno a~docyear a~zzchanumber a~doctype
                 a~vessname a~rotno a~rotdt a~portship a~orgcntry a~modtran
                    a~rotno a~rotdt a~concntry a~impdpsno a~impdpdat
                    a~concntry  a~zzkunnr a~pdocno a~pdocyear a~arivport
                    a~zztono b~bondregnno b~bondstadat b~bondenddat
                    b~expdt1 b~expdt2 a~loadport a~zzintrst
                    INTO CORRESPONDING FIELDS OF TABLE  it_behdr
                   FROM /ivl/zmb_behdr AS a INNER JOIN /ivl/zmb_bndmas AS b
                   ON a~bondno = b~bondno
                   WHERE zztono = tonumber
                   AND a~bonddat = b~bonddate.
      SORT it_behdr.
      LOOP AT it_behdr.
        SELECT SINGLE adrnr
        INTO addr FROM lfa1
        WHERE sortl = it_behdr-zzchanumber.
        SELECT SINGLE name1 name2 name3 street house_num1 str_suppl1
                      str_suppl2 city1  post_code1
        INTO (w_cname1, w_cname2, w_cname3, w_cstreet,w_chouse_num1,
              w_cstr_suppl1, w_cstr_suppl2, w_ccity1, w_cpost_code1)
        FROM adrc
        WHERE addrnumber = addr.
        SELECT  SINGLE *
        FROM /ivl/zmb_beref
    *Begin of modification for change $02
    WHERE  refdocno = it_behdr-bondno.
        WHERE boerefno =  it_behdr-pdocno AND
              boeyr  =  it_behdr-pdocyear.
    *End of modification for change $02
        IF sy-subrc = 0.
          it_behdr-linno  = /ivl/zmb_beref-linno.
          it_behdr-ablno  =  /ivl/zmb_beref-ablno.
          it_behdr-abldat = /ivl/zmb_beref-abldat.
        ENDIF.
        SELECT SINGLE *
        FROM t005t
        WHERE land1  = /ivl/zmb_behdr-orgcntry
          AND spras  = 'E'.
        IF sy-subrc = 0.
          it_behdr-orgicnty = t005t-landx.
        ENDIF.
        SELECT SINGLE *
        FROM  /ivl/zcm_codmas
        WHERE codtyp = 'PCOD'
          AND code = it_behdr-arivport.
        IF sy-subrc = 0.
          it_behdr-portcode = /ivl/zcm_codmas-coddesc.
        ENDIF.
        SELECT SINGLE *
        FROM /ivl/zcm_codmas
        WHERE code = it_behdr-concntry.
        IF sy-subrc = 0.
          it_behdr-coddesc = /ivl/zcm_codmas-coddesc.
        ENDIF.
        SELECT SINGLE *
        FROM  /ivl/zcm_codmas
        WHERE codtyp  = 'PORT'
          AND code = it_behdr-loadport.
        IF sy-subrc = 0.
          it_behdr-portdesc = /ivl/zcm_codmas-coddesc.
        ENDIF.
        SELECT SINGLE *
        FROM  t005t
        WHERE land1 = it_behdr-concntry.
        IF sy-subrc = 0.
          it_behdr-coname = t005t-landx.
        ENDIF.
        SELECT *
        FROM kna1
        WHERE kunnr = it_behdr-zzkunnr.
          IF sy-subrc = 0.
            it_behdr-name1 = kna1-name1.
            it_behdr-name2 = kna1-name2.
            it_behdr-ort01 = kna1-ort01.
            it_behdr-pstl2 = kna1-pstl2.
            it_behdr-telfx = kna1-telfx.
          ENDIF.
        ENDSELECT.
        SELECT *
        FROM zvincust
        WHERE kunnr = it_behdr-zzkunnr.
          IF sy-subrc = 0.
            it_behdr-notinum1  = zvincust-notinum1.
            it_behdr-dsirregno = zvincust-dsirregno.
            it_behdr-iecode1   = zvincust-iecode.
          ENDIF.
        ENDSELECT.
        SELECT SINGLE *
        FROM /ivl/zmb_tarnt
        WHERE tarntno = it_behdr-notinum1.
        IF sy-subrc = 0.
          it_behdr-notinum1 = /ivl/zmb_tarnt-tarntno.
          it_behdr-descs1 = /ivl/zmb_tarnt-descs.
        ENDIF.
        SELECT iecode
        INTO it_behdr-iecode
        FROM zvincust
        WHERE kunnr = 'IN02'.
        ENDSELECT.
           MODIFY it_behdr TRANSPORTING name1 name2 ort01 pstl2 telfx
               linno ablno abldat coname portdesc portcode
               coddesc notinum1 dsirregno iecode1 conscnty iecode descs1.
           SELECT SINGLE kunnr                                              "$05
                        INTO it_behdr-kunnr
                        FROM VBPA
                        WHERE vbeln = it_vbeln-wdno
                          AND PARVW = 'AG'.                                 "$05
           SELECT SINGLE adrnr                                              "$05
                 INTO  addr FROM Kna1
                 WHERE kunnr = it_behdr-kunnr.                              "$05
           SELECT SINGLE name1 name2 name3 street house_num1 str_suppl1     "$05
                      str_suppl2 city1  post_code1
           INTO (w_cname4, w_cname5, w_cname6, w_cstreet1,w_chouse_num2,
              w_cstr_suppl3, w_cstr_suppl4, w_ccity2, w_cpost_code2)
           FROM adrc
           WHERE addrnumber = addr.                                          "$05
      ENDLOOP.
       SELECT SINGLE   vbeln INTO it_vbeln                  "$05
               FROM     LTAP
               WHERE    tanum = tonumber
               AND      lgnum  = w_lgnum.                 "$05
    ENDFORM.                               " WRITE_HEADER1
                      Form  ITEM_DETAILS
    FORM item_details.
      SELECT *
      FROM /ivl/zmb_bedut
      INTO TABLE it_bedut
      WHERE doctype = it_behdr-doctype
        AND docno   = it_behdr-docno
        AND docyear = it_behdr-docyear.
      SELECT *
      FROM /ivl/zmb_beitm
      INTO CORRESPONDING FIELDS OF it_beitm
      WHERE doctype = it_behdr-doctype
        AND docno   = it_behdr-docno
        AND docyear = it_behdr-docyear.
        LOOP AT it_bedut WHERE doctype = it_beitm-doctype
                           AND docno   = it_beitm-docno
                           AND docyear = it_beitm-docyear
                           AND boeitno = it_beitm-boeitno.
          CASE it_bedut-dutcode.
            WHEN  'BCD'.
              MOVE it_bedut-dutyrat TO it_beitm-dutyratbcd.
              MOVE it_bedut-sysvalu TO it_beitm-sysvalubcd.
            WHEN 'CVD'.
              MOVE it_bedut-dutyrat TO it_beitm-dutyratcvd.
              MOVE it_bedut-sysvalu TO it_beitm-sysvalucvd.
            WHEN 'SAD'.
              MOVE it_bedut-dutyrat TO it_beitm-dutyratsad.
              MOVE it_bedut-sysvalu TO it_beitm-sysvalusad.
    insert on 120704 for education cess $03
            WHEN 'ZCES'. "zces
              MOVE it_bedut-dutyrat TO it_beitm-dutyratcess.
              MOVE it_bedut-sysvalu TO it_beitm-sysvalucess.
            WHEN 'ZEDC'.  "zedc
              MOVE it_bedut-dutyrat TO it_beitm-dutyratedc.
              MOVE it_bedut-sysvalu TO it_beitm-sysvaluedc.
    end of insert on 120704 for education cess $03
            WHEN 'ZHCS'.
              MOVE it_bedut-dutyrat TO it_beitm-dutyrathcs.          "$04
              MOVE it_bedut-sysvalu TO it_beitm-sysvaluhcs.          "$04
            WHEN 'ZHDC'.                                             "$04
              MOVE it_bedut-dutyrat TO it_beitm-dutyrathdc.          "$04
              MOVE it_bedut-sysvalu TO it_beitm-sysvaluhdc.          "$04
           it_beitm-totassval  = it_beitm-totassval + it_beitm-sysvalubcd +
                                                            it_beitm-assval.
      it_beitm-totsysvalubcd = it_beitm-totsysvalubcd + it_beitm-sysvalubcd.
          ENDCASE.
        ENDLOOP.
        APPEND it_beitm.
        CLEAR it_beitm.
      ENDSELECT.
      SORT it_beitm BY cthno.
      MOVE it_beitm TO beitm.
      MOVE it_beitm TO it_zbeitm.
      APPEND it_zbeitm.
      CLEAR it_zbeitm.
    ENDFORM.                               " ITEM_DETAILS
                        Form  BONDNUMBER
    FORM bondnumber.
      READ TABLE it_behdr WITH KEY
           zztono = tonumber
           docno  = zdocno.
      IF sy-subrc = 0.
        MOVE it_behdr TO it_behdr1.
        APPEND it_behdr1.
      ENDIF.
    CLEAR zdocno.
    ENDFORM.                    " BONDNUMBER
                       Form  ITEM_PRINT
    FORM item_print.
      TABLES : itcpo.
      TABLES : itcpp.
      DATA: params   LIKE pri_params,
            arparams LIKE arc_params,
            days(1)  TYPE n VALUE 2,
            valid    TYPE c.
      itcpo-tdpreview = 'X'.
      itcpo-tdnewid   = 'X'.
      itcpo-tdimmed   = 'X'.
      itcpo-tddelete  = 'X'.
      CALL FUNCTION 'OPEN_FORM'
        EXPORTING
          application    = 'TX'
          archive_index  = ' '
          archive_params = '1'
          device         = 'PRINTER'
          dialog         = 'X'
          form           = ' '
          language       = sy-langu
          options        = itcpo
        IMPORTING
          RESULT         = itcpp
        EXCEPTIONS
          OTHERS         = 7.
                      Header IT-table loop--start              *
      LOOP AT it_behdr.
        zdocno = it_behdr-docno.
        CLEAR it_beitm.
        CLEAR it_zbeitm.
        REFRESH it_beitm.
        REFRESH it_zbeitm.
        PERFORM temp_code.
        CLEAR imptot.
        CLEAR subamtbas.
        CLEAR saltot.
        CLEAR subtotduty.
        CALL FUNCTION 'START_FORM'
          EXPORTING
            form     = 'ZSV_GBOE'
            language = sy-langu.
        CALL FUNCTION 'WRITE_FORM'
          EXPORTING
            element  = 'HEAD'
            function = 'SET'
            type     = 'BODY'
            window   = 'HEADER'.
        CLEAR count.
                  Line item loop --start                          *
        LOOP AT it_beitm.
    *The 8 variables r used for the total to be printed             *
    *at the first line of the tariff number                         *
          READ TABLE it_zbeitm WITH  KEY
                cthno = it_beitm-cthno.
          IF sy-subrc = 0.
            var1 = it_zbeitm-zbcdasstot.
            var2 = it_zbeitm-zdutyratcvd .
            var3 = it_zbeitm-zpcvdtot.
            var4 = it_zbeitm-ztotduty.
            var5 = it_zbeitm-zbatcvdtot.
            var6 = it_zbeitm-zdutyratsad.
            var7 = it_zbeitm-zsad.
            var8 = it_zbeitm-zpsadtot.
            sad  = 'SAD'.
    insert on 120704 for education cess     $03
            var9 = it_beitm-dutyratcess.
            var10 = it_zbeitm-zpcesstot.  "sysvalucess.
            var11 = it_beitm-dutyratedc.
            var12 = it_zbeitm-zpedctot.  "sysvaluedc.
           var13 = it_beitm-sysvalubcd + var3 + var10.             $04
           var14 = var4 + var13 + var12.                           $04
    end of insert on 120704 for education cess
            var15 = it_beitm-dutyrathcs.                            "$04
            var16 = it_zbeitm-zphcstot.                             "$04
            var17 = it_beitm-dutyrathdc.                            "$04
            var18 = it_zbeitm-zphdctot.                             "$04
            var13 = it_beitm-sysvalubcd + var3 + var10 + var16.     "$04
            var14 = var4 + var13 + var12 + var18.                   "$04
            var20 = var10 + var16.                                  "$04
            var21 = var12 + var18.                                  "$04
          ENDIF.
          count = count + 1.
          MOVE it_beitm TO beitm.
          beitm-sad = 'SAD'.
                      FOOTER TOTAL.                                  *
          intrs      = intrs      + ( it_beitm-netpr * it_beitm-wkurs1 ).
          netpr1     = netpr1     + it_beitm-netpr.
          frgtamt1   = frgtamt1   + ( it_beitm-frgtamt * it_beitm-wkurs2 ).
          frgtamt3   = frgtamt3   + it_beitm-frgtamt.
          insuamt3   = insuamt3   + it_beitm-insuamt.
          insuamt1   = insuamt1   + ( it_beitm-insuamt * it_beitm-wkurs3 ).
          misschar1  = misschar1  + it_beitm-misschat.
          landchar1  = landchar1  + it_beitm-landchar.
          misccharge = ( frgtamt1 + intrs + insuamt1 ) / 100.
          missland   = ( missland + misschar1 + landchar1 ) - totvalin1.
             Sub Total Cal  at end of each Tariff No.                 *
          imptot    = imptot    + it_beitm-sysassval.
          saltot    = saltot    + it_beitm-assval.
          subamtbas = subamtbas + it_beitm-sysvalubcd.
    To Print the total at every first line of the tariff number(cthno) *
          cthno2 = it_beitm-cthno.
          IF cthno1 = cthno2.
            CLEAR var1.
            CLEAR var2.
            CLEAR var3.
            CLEAR var4.
            CLEAR var5.
            CLEAR beitm-dutyratsad.
            CLEAR var7.
            CLEAR var8.
            CLEAR sad.
    Insert for Education cess
            CLEAR : var9, var10, var11, var12.
    End of insert
            CLEAR : var15, var16, var17, var18, var20, var21.       "$04
            CALL FUNCTION 'WRITE_FORM'
              EXPORTING
                element  = 'BOE_DETAILS'
                function = 'APPEND'
                type     = 'BODY'
                window
                ='MAIN'
              EXCEPTIONS
                OTHERS   = 8.
          ELSE.
         subtotduty = subtotduty + it_zbeitm-ztotduty + it_zbeitm-zpsadtot
          subtotduty = subtotduty + it_zbeitm-ztotduty + it_zbeitm-zpsadtot
                      + it_zbeitm-zpedctot.                       "$04
                        + it_zbeitm-zpedctot + it_zbeitm-zphdctot.  "$04
            CALL FUNCTION 'WRITE_FORM'
              EXPORTING
                element  = 'BOE_DETAILS'
                function = 'APPEND'
                type     = 'BODY'
                window   = 'MAIN'
              EXCEPTIONS
                OTHERS   = 8.
          ENDIF.
          AT END OF cthno.
            CALL FUNCTION 'WRITE_FORM'
              EXPORTING
                element  = 'TOTAL'
                function = 'APPEND'
                type     = 'BODY'
                window   = 'MAIN'
              EXCEPTIONS
                OTHERS   = 8.
          ENDAT.
                            FOR INTEREST                                *
          AT LAST.
            bonddat1 = sy-datum.
            it_behdr-bonddat = it_behdr-bonddat + 90.
            bonddat1 = bonddat1 + 6.                                "$04
            IF it_behdr-zzintrst <> 0.
              CALL FUNCTION 'WRITE_FORM'
                EXPORTING
                  element  = 'INTEREST'
                  function = 'APPEND'
                  type     = 'BODY'
                  window   = 'MAIN'
                EXCEPTIONS
                  OTHERS   = 8.
              subtotduty = subtotduty + it_behdr-zzintrst.
            ENDIF.
          ENDAT.
          CLEAR pbcdtot.
          CLEAR passvaltot.
          CLEAR bcdasstot.
          CLEAR pcvdtot.
          CLEAR totduty.
          CLEAR dutypaid.
          CLEAR batcvdtot.
          CLEAR psadtot.
          dutyratcvd = it_beitm-dutyratcvd.
          pgtotal = subtotduty.
          CALL FUNCTION 'FI_ROUND_AMOUNT'
            EXPORTING
              amount_in  = pgtotal
              company    = '1970'
              currency   = 'INR'
            IMPORTING
              amount_out = pgtotal.
          CALL FUNCTION 'SPELL_AMOUNT'
            EXPORTING
              amount    = pgtotal
              currency  = 'INR'
              filler    = ' '
              language  = sy-langu
            IMPORTING
              in_words  = spellamt
            EXCEPTIONS
              not_found = 1
              too_large = 2
              OTHERS    = 3.
          IF sy-subrc = 0.
            sum_totdty1 = spellamt-word.
           sum_totdty2 = spellamt-DECword.
          ENDIF.
                 To Print only 5 items per page                     *
          IF count >= 5.
            netpr3     = netpr1.
            intrs      = intrs.
            frgtamt2   = frgtamt1.
            insuamt2   = insuamt1.
            misschar2  = missland.
            totvalin2  = totvalin1.
            imptot1    = imptot.
            saltot1    = saltot.
            frgtamt3   = frgtamt3.
            insuamt3   = insuamt3.
            imptot     = imptot .
            saltot     = saltot .
            dutyratcvd = it_beitm-dutyratcvd.
            CALL FUNCTION 'WRITE_FORM'
              EXPORTING
                element   = 'FOOTER'
                window
                ='FOOTER'
              EXCEPTIONS
                OTHERS    = 8.
            CALL FUNCTION 'CONTROL_FORM'
              EXPORTING
                command = 'NEW-PAGE'
              EXCEPTIONS
                OTHERS  = 3.
            CLEAR pagetotal1.
            CLEAR totalbcd1.
            CLEAR item_duty.
            CLEAR dutyratcvd.
            CLEAR setamt1.
            CLEAR cvdtotal1.
            CLEAR pagetotal2.
            CLEAR sadtotal1.
            CLEAR count.
            CLEAR totvalin2.
            CLEAR sysvalin2.
            CLEAR assvalin2.
            CLEAR dutypaid.
            CLEAR cthno2.
          ENDIF.
          CLEAR cthno2.
          cthno1 = it_beitm-cthno.
        ENDLOOP.
                     End of the it_beitm                       *
        netpr3    = netpr1.
        intrs     = intrs.
        frgtamt2  = frgtamt1.
        insuamt2  = insuamt1.
        frgtamt3  = frgtamt3.
        insuamt3  = insuamt3.
        misschar2 = missland.
        totvalin2 = totvalin1.
        imptot1   = imptot.
        saltot1   = saltot.
        CALL FUNCTION 'WRITE_FORM'
          EXPORTING
            element   = 'FOOTER'
            window
            ='FOOTER'
          EXCEPTIONS
            OTHERS    = 8.
                      End of sub-total                         *
        CALL FUNCTION 'END_FORM'.
        CLEAR imptot.
        CLEAR subamtbas.
        CLEAR saltot.
        CLEAR cthno1.
        CLEAR cthno2.
        CLEAR var1.
        CLEAR var2.
        CLEAR var3.
        CLEAR var4.
        CLEAR var5.
        CLEAR beitm-dutyratsad.
        CLEAR var7.
        CLEAR var8.
        CLEAR sad.
        CLEAR dutypaid1.
    *Begin of modification for change $02
        CLEAR: intrs,
        netpr1,
        frgtamt1,
        frgtamt3,
        insuamt3,
        insuamt1,
        misschar1,
        landchar1,
        misccharge,
        missland .
    *End of modification for change $02
               Loop ends for the Header table                 *
      ENDLOOP.
      CALL FUNCTION 'CLOSE_FORM'
        EXCEPTIONS
          unopened                 = 1
          bad_pageformat_for_print = 2
          OTHERS                   = 3.
      CLEAR wrk_mode.
      CLEAR /ivl/zcm_codmas.
      CLEAR t001.
      GET PARAMETER ID 'BUK' FIELD wrk_bukrs.
      it_behdr-bukrs = wrk_bukrs.
      SELECT SINGLE *
      FROM  t001
      WHERE bukrs  = wrk_bukrs.
    ENDFORM.                               " PRINT_BILLOFENTRY
                         Form  temp_code
    FORM temp_code.
      CLEAR it_behdr1.
      REFRESH it_behdr1.
      PERFORM bondnumber.
      PERFORM  item_details.
      LOOP AT it_beitm.
        SELECT SINGLE *
        FROM /ivl/zmb_tarnt
        WHERE tarntno = it_beitm-cthno.
        IF sy-subrc = 0.
          it_beitm-cetno = /ivl/zmb_tarnt-cetno.
          it_beitm-descs = /ivl/zmb_tarnt-descs.
          MODIFY it_beitm TRANSPORTING cetno descs docno doctype.
        ENDIF.
        count = count + 1.
        MOVE it_beitm TO beitm.
        MOVE it_beitm TO it_zbeitm.
        beitm-sad  = 'SAD'.
        pbcdtot    = it_beitm-sysvalubcd + pbcdtot.
        passvaltot = it_beitm-assval + passvaltot.
        psadtot    = it_beitm-sysvalusad + psadtot.
        psadtot1   =  psadtot1 + psadtot.
        bcdasstot  = pbcdtot + passvaltot.
        pcvdtot    = it_beitm-sysvalucvd + pcvdtot.
    insert on 150704
        pcestot    = it_beitm-sysvalucess + pcestot.
        pcestot1   =  pcestot1 + pcestot.
        pedctot  = pedctot + it_beitm-sysvaluedc.
        pedctot1    = pedctot1 + pedctot.
    end of insert on 150704
        phcstot    = it_beitm-sysvaluhcs + phcstot.                  "$04
        phcstot1   =  phcstot1 + phcstot.                            "$04
        phdctot    = phdctot + it_beitm-sysvaluhdc.                  "$04
        phdctot1   = phdctot1 + phdctot.                             "$04
        totduty    = pbcdtot + pcvdtot + pcestot + phcstot.          "$04
        totduty1   = totduty1 + totduty.
        batcvdtot  = bcdasstot + pcvdtot.
        totalbcd   = totalbcd + it_beitm-sysvalubcd.
        totassval1 = totassval1 + it_beitm-assval.
        dutypaid   = totduty + psadtot.
        dutyratcvd = it_beitm-dutyratcvd.
        dutyratsad = it_beitm-dutyratsad.                            "$04
        sysvalusad = it_beitm-zsad.
        AT END OF cthno.
          cvdtotal1            = cvdtotal.
          sadtotal1            = sadtotal.
          pagetotal1           = pagetotal.
          setamt1              = pagetotal1 + cvdtotal1.
          totalbcd1            = totalbcd.
          item_duty            = totalbcd1 + setamt1.
          pagetotal2           = pagetotal1 + cvdtotal1.
          dutypaid1            = dutypaid1 + dutypaid.
          it_beitm-zbcdasstot  = bcdasstot.
          it_beitm-zdutyratcvd = dutyratcvd.
     

    Hi Ali,
    Write IF condition in the script in the correspodant window. Or for that perticular paragram select the check box <b>'No blank lines</b>' in the paragraph format.
    Hope this helps you, reply for queries, Shall post you the updates.
    Regards. 
    Kumar. .

  • Difference between line type and table type

    hi,
    can any one explain the difference between line type and table type . and how to declare a internal table and work area in BSP's

    hi,
    Go through this blog, this might help you.
    /people/tomas.altman/blog/2004/12/13/sdn-blog-how-to-do-internal-tables-in-bsp
    People who have worked with ABAP for a while sometimes forget that the internal table concept is rather different than what exists in most programming languages. It is very powerful, but at the same time can be confusing.
    In SAP it is possible to have a table which is the rows and a headerline which is the working area or structure which can then be commited to the table.
    With a BSP, if we try to create an internal table within the BSP event or layout we will get the following error: mso-bidi-
                            "InternalTableX" is not an internal table - the "OCCURS n" specification is mso-bidi- missing.
    class="MsoNormal"><![if !supportEmptyParas]>The problem we are seeing as an inconsistency has to do with the difference between classic ABAP and ABAP Objects. When SAP introduced ABAP Objects they decided to clean up some of the legacy syntax and create stricter rules. However they didn't want to break the millions of line of code that already existed, so they only implemented these stricter checks when OO is being used. Therefore you can declare a table with a header line in a regular ABAP program or Function Module but you can't have one with a header line in OO.
    Because everything in BSP generates ABAP OO classes behind the scenes, you get these same stricter syntax checks. My suggestion is that you have a look in the on-line help at the section on ABAP Objects and always follow the newer syntax rules even when writing classic ABAP programs.
    In a BSP when we need to work with a table we must always do the following:
    1, in the Types definitions create a structure:
                            types : begin of ts_reclist,
    mso-bidi-        style='mso-tab-count:2'>                            receiver type somlreci1-receiver,
    mso-bidi-        style='mso-tab-count:2'>                 style='mso-tab-count: 1'>             rec_type type somlreci1-rec_type,
    mso-bidi-         style='mso-tab-count:2'>                            end of ts_reclist.
    mso-bidi- <![if !supportEmptyParas]> <![endif]>
    but we must remember this is only a structure definition and we cannot store anything in it, although we can use it elsewhere as a definition for Structures(WorkAreas)
    2, in our Types definitions (this is the best place for this one as we can then access it from many areas without having to create it locally) so in the Types definitions we must create a TableType:
    class="MsoNormal">                         types : tt_reclist type table of ts_reclist.
    class="MsoNormal"><![if !supportEmptyParas]> <![endif]> this TableType is our table definition and again we cannot store anything in it, but we can use it elsewhere as a definition for InternalTables
    3, now that you have laid the foundations you can build and in the event handler, it is now simply a case of creating the InternalTable based upon the Table definition:
                           data: t_reclist type tt_reclist.
    and creating the structure based upon the structure definiton:
    <![if !supportEmptyParas]>   <![endif]>                         data: s_reclist type ts_reclist.
    as described above, the structure becomes the work area and this is where you assign new values for elements of the table eg:<![endif]>
                            s_reclist-receiver = '[email protected]'.   "<-- change address
    mso-bidi- <![if !supportEmptyParas]> <![endif]>
    mso-bidi-                         s_reclist-rec_type = 'U'.
    and then once the data is in the elements of the structure, the structure can be appended to the internal table as follows: class="MsoNormal">
                            append s_reclist to t_reclist.
    <![if !supportEmptyParas]> <![endif]>
    the internal table will then be readable for the ABAP function and can be applied for example as follows: class="style1">           style='mso-tab-count:1; font-family: "Courier New", Courier, mono;'>          
    class="style1">CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
                            EXPORTING
    style='mso-tab-count:2'>                                    document_data = docdata
    style='mso-tab-count:2'>                                    DOCUMENT_TYPE = 'RAW'
    style='mso-tab-count:2'>                                    PUT_IN_OUTBOX = 'X'
    style='mso-tab-count:2'>                                    COMMIT_WORK = 'X' "used from rel.6.10
                            TABLES
    mso-bidi-font-size: style='mso-tab-count:2'>                                    receivers = t_reclist
    class="style1"> <![if !supportEmptyParas]>   <![endif]>
    <![if !supportEmptyParas]>F inally, a comment from Thomas Jung,
    <![if !supportEmptyParas]> “when defining my work area for an internal table I like to use the like line of statement. That way if I change the structure of my table type, I know that my work area will still be OK. Second, your types and table types don't have to just be declared in your code. You can create a table type in the data dictionary and use it across multiple programs(also great for method and function parameters). I really push hard for the other developers at my company to use the Data Dictionary Types more and more.”
    Hope this helps, Do reward.

  • Table to see the link between line items on bank statement to customer invo

    table to see the link between line items on bank statement to customer invoices

    Hi,
    There is no link from VBRP to BSEG directly.
    This is because the data in BSEG is posted to various accounts and the VBRP is usually for a Sales Order or Delivery.
    However there is a link from BKPF to VBRK and VBRK is linked to VBRP.
    BKPF-AWKEY has the the Invoice number VBRK-VBELN
    Hope this helps.
    regards,
    Advait

  • Only page 1 prints well. Page 2 is offset to the right and information is lost at the page break. FireFox 8 and 9, Mac OS 10.6.8

    Mac OS 10.6.8 FireFox 8 and 9
    If I print a web page, either just print or save as PDF, only the first page prints well. Page 2 is offset to the right such that the information is cut off at the right edge. Information is lost at the page break, several lines of text will be lost. If I need to print a page, I open Safari, which does a very nice job of formating the page for print. But I want to use FireFox. Can you help me?

    Does the issue still occur if you start Firefox in Safe Mode? http://support.mozilla.com/en-US/kb/Safe+Mode
    How about with a new, empty profile? http://support.mozilla.com/en-US/kb/Basic%20Troubleshooting#w_8-make-a-new-profile
    If it does happen in both safe mode and with a new profile, please post the contents from about:support

  • Only page 1 prints well. Page 2 is offset to the right and information is lost at the page break. FireFox 8 and 9, Mac OS 10.5.8

    This is very similar to a previous post with a later version of OS X, but the fix that worked for the original poster does not work for me.
    Mac OS 10.5.8 FireFox 8 and 9. If I print a web page, either just print or save as PDF, only the first page prints well. Page 2 is offset to the right such that the information is cut off at the right edge. Information is lost at the page break, several lines of text will be lost.
    I use several add-ons for work that are only on Firefox, so using another browser doesn't help much.

    Somebody had a similar problem and was advised to start in safe mode or create a new profile. (Here: https://support.mozilla.org/en-US/questions/906274?s=firefox+print+first+page&r=2&e=sph&as=s). Starting in safe mode disabling all add-ons does not fix the problem for me. When I try to follow the instructions here (https://support.mozilla.org/en-US/kb/Managing-profiles) to start the profile manager, Terminal gives me an error message after I enter the line of text: "The application firefox-bin quit unexpectedly." I have tried it with and without the "-bin" (the error message is the same - just with or without the "-bin"), with a capital or lower case P at the end. Nothing works. Please help.

  • PO printout is not coming after changing only line item Delivery Address

    Hi
    Can anybody suggest a solution for the problem?
    Using ME22N , if I change the line item delivery address details to the already generated manual address number ( Not generated using Transaction MEAN)
    If I save the PO then PO Printout is not coming but output message log showing " No print-relevant changes to document XXXXXXXXX exist"
    We can read CDHR and CDPOS table for changes .
    Is there a way to pass the parameter to the print program to Print the changes?
    Thanks
    sanath
    Edited by: sanath kumar sarvepalli-venkata on Nov 2, 2010 11:23 PM

    Hi,
    In IMG - Materials Management- Purchasing-Messages - Fields relevant to Print out of changes
    Enter Table EKPO , Reference Field LOEKZ, tick on change print relevant for purchase order,in routine enter 03.
    Now your Output will be triggered with a change indicator and you can process it using ME9F.
    Regards
    Chandra Shekhar

  • Changing line item delivery address in shopping cart need to reflect same in all line items

    Hi All,
    Need help on below,
    I have a requirement that when we change the shopping cart line item delivery address same needs to reflect all line items.
    Suppose a shopping cart having 3 line items 1, 2 and 3. if i change the delivery address of line item 1, the same needs to reflect the line item 2 and 3 as well.
    In my case  if we change the 1's delivery address, after processing its genrating the IDOC on line item wise not in the header wise. And same having the different delivery address.
    Thanks in advance.
    regards:
    Ramesh

    Hello Ramesh,
    we can do this changes in BBP_DOC_CHANGE_BADI . Create a Implementation for the above BADI and Inside that Implementation BADI method just call the function module BBP_PD_SC_GETDETAIL for SC item details by passing the Header GUID.
    Once you get the Partner table(E_PARTNER) details.. Keeping a loop on SC item(E_ITEM) and change address number(ADDR_NO) in Partner table when Partner function eq X( X is an partner function values which you define in SPRO.).
    pseudo logic:
      CALL FUNCTION 'BBP_PD_SC_GETDETAIL'
        EXPORTING
          i_guid    = l_guid
        TABLES
          e_item    = lt_item
          e_partner = lt_partner.
    * Check for all the line items if vendor is assigned
      LOOP AT lt_item INTO lwa_item.
        READ TABLE lt_partner INTO lwa_partner
                          WITH KEY partner_fct = '00000019'
                                   del_ind     = space
                                   p_guid      = lwa_item-guid.
        IF sy-subrc eq 0 .
       * modification of address number logic here in partner table
        ENDIF.
      ENDLOOP.
    All the best.
    Regards,
    Sankarbabu

  • Pivot Table, "Insert Page Break After Each Item" Setting Only Works for the First Item Change

    I have a flattened pivot table generated from Powerpivot and I would like to insert a page break for each change in the row item.
    When I use the pivot table Field Settings>Insert Page Break After Each Item, Excel inserts the first page break then returns to normal pagination for the rest of the output.
    Is there another setting required to maintain the page breaks after the item change?
    Thanks.

    We are experiencing the same problem. Did you ever find a solution?

Maybe you are looking for

  • Color & grayscale problems with LJ CP2025dn

    I recognize that it is unrealistic to expect high fidelity color printing from my CP2025dn, but it really does print much too saturated and contrasty images. I can get much better results in Photoshop by applying a Levels correction before printing a

  • Problem with video conference

    I just bought a MacBook, and I am having problems connecting to others via the iSight. I got it to work with my roommate's computer, but I mainly want it to work on my fiancee's. I have Tiger, and she has Windows XP. I searched and searched and opene

  • Speed up query

    hiiiii,,,, i am running a query in an database stored procedure,but its taking long time to run Plzz tel me wat are the ways to increase speed of the query.........

  • V.15 Back Order List

    When running the V.15 transaction with 'Fast display / Document overview' selected it doen not display any values for 'Net value', 'Ship-to party name', 'Material', 'Description' etc.  The list seems to be reading from structure VBVFE which in turn i

  • ITunes (64bit)  - freezes when checking updates for connected iPad

    Hello: I have the latest version of iTunes (same problem on previous versions). It's on a clean Win 7 64bit PC, i7, 8gb ram. If i connect a device it eventually brings up iTunes, goes into a sync and completes without error. If I then select my iPad