Final total cannot appear when the last line item reached the page end
Hi All,
My report included 2 pages. Problem is the final total cannot appear when the last line item reached the page end. (page 2)
final total will appear on the middle of last page (page 3) when i comment (type = 'BOTTOM').
Below is the program.
CALL FUNCTION 'OPEN_FORM'
EXPORTING
device = 'PRINTER'
dialog = 'X'
form = 'ZBOTM_VOUCHER'
language = sy-langu.
sort itab by vblnr.
LOOP AT itab INTO wa_itab.
move wa_itab-vblnr to reguh-vblnr.
move wa_itab-lifnr to reguh-lifnr.
move wa_itab-rbetr to reguh-rbetr.
reguh-rbetr = reguh-rbetr * -1.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
window = 'MAIN'
element = 'DETAIL'.
t_rbetr = reguh-rbetr + t_rbetr.
AT LAST.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
window = 'LINE'.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'TOTAL'.
type = 'BOTTOM'
WINDOW = 'MAIN'.
ENDAT.
Thanks.
Hi,
Where should I include the code for bottom?
How to open text editor?
Thanks.
Edited by: Alice8 on Feb 7, 2011 9:09 AM
Similar Messages
-
Only the last line item is shown in main window...
Hello Experts,
I created a custom form for the standard checque program RFFOUS_C. Now, in my MAIN window, I
called a subroutine in a custom program which loops through the line items but the problem is
only the last line item is being shown. I tried using CONTROL_FORM to create a new line
but it does not work. Note that I did not customize RFFOUS_C since it is being used by
multiple companies. Below is my code:
SAPSCRIPT:
510-C
Begin of insertion DEVK940799 11/10/2008 DEL_HIDALGO
DEFINE <YC_XBLNR& = ''
DEFINE <YC_BLDAT& = ''
DEFINE <YC_SGTXT& = ''
DEFINE <YC_DMBTR& = ''
PERFORM WRITE_LINE_ITEMS IN PROGRAM Z9999RFI_Z2574FFI_RA
USING ®UH-LAUFD&
USING ®UH-LAUFI&
USING ®UH-XVORL&
USING ®UH-ZBUKR&
USING ®UH-LIFNR&
USING ®UH-VBLNR&
CHANGING <YC_XBLNR&
CHANGING <YC_BLDAT&
CHANGING <YC_SGTXT&
CHANGING <YC_DMBTR&
ENDPERFORM
PROTECT
<YC_XBLNR& <YC_BLDAT& <YC_SGTXT& <YC_DMBTR&
ENDPROTECT
End of insertion DEVK940799 11/10/2008 DEL_HIDALGO
PROGRAM:
IF gt_regup[] IS NOT INITIAL.
CALL FUNCTION 'OPEN_FORM'
EXPORTING
* APPLICATION = 'TX'
* ARCHIVE_INDEX =
* ARCHIVE_PARAMS =
* DEVICE = 'PRINTER'
* DIALOG = 'X'
form = lcc_z2574ffi_ra
* LANGUAGE = SY-LANGU
* OPTIONS =
* MAIL_SENDER =
* MAIL_RECIPIENT =
* MAIL_APPL_OBJECT =
* RAW_DATA_INTERFACE = '*'
* SPONUMIV =
* IMPORTING
* LANGUAGE =
* NEW_ARCHIVE_PARAMS =
* RESULT =
EXCEPTIONS
canceled = 1
device = 2
form = 3
OPTIONS = 4
unclosed = 5
mail_options = 6
archive_error = 7
invalid_fax_number = 8
more_params_needed_in_batch = 9
spool_error = 10
codepage = 11
OTHERS = 12.
IF sy-subrc <> 0.
* MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
* WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
LOOP AT gt_regup INTO lw_regup.
m_line_items 'LTYC_XBLNR' lw_regup-xblnr.
m_line_items 'LTYC_BLDAT' lw_regup-bldat.
m_line_items 'LTYC_SGTXT' lw_regup-sgtxt.
m_line_items 'LTYC_DMBTR' lw_regup-dmbtr.
DELETE ex_output WHERE value IS INITIAL.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = '510-C'
function = 'APPEND'
* TYPE = 'BODY'
window = 'MAIN'
* IMPORTING
* PENDING_LINES =
EXCEPTIONS
element = 1
function = 2
type = 3
unopened = 4
unstarted = 5
window = 6
bad_pageformat_for_print = 7
spool_error = 8
codepage = 9
OTHERS = 10.
IF sy-subrc <> 0.
* MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
* WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
CALL FUNCTION 'CONTROL_FORM'
EXPORTING
command = 'NEW-LINE'
EXCEPTIONS
unopened = 1
unstarted = 2
OTHERS = 3.
IF sy-subrc <> 0.
* MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
* WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDLOOP.
CALL FUNCTION 'CLOSE_FORM'
* IMPORTING
* RESULT =
* RDI_RESULT =
* TABLES
* OTFDATA =
EXCEPTIONS
unopened = 1
bad_pageformat_for_print = 2
send_error = 3
spool_error = 4
codepage = 5
OTHERS = 6.
IF sy-subrc <> 0.
* MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
* WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDIF.Hi,
Write the at last event in the program and check if it works
At last.
CALL FUNCTION 'CONTROL_FORM'
EXPORTING
command = 'NEW-LINE'
EXCEPTIONS
unopened = 1
unstarted = 2
OTHERS = 3.
IF sy-subrc 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Regards,
Sravanthi -
How to handle the multiple line items in the Inbound idoc FM
Hi ,
Can any body give me how to handle the multiple line item in the idoc when we reprocessing it from workitem....
Thanks in Advance,,,,
Regards,
BharaniHi ,
Can any body give me how to handle the multiple line item in the idoc when we reprocessing it from workitem....
Thanks in Advance,,,,
Regards,
Bharani -
Sample Material in the 3rd Line item of the Sales Order
Hi,
We have configured the system in the sales order as follows.
1. Commercial Material
2. Bonus Material.(ie Free Material)
Now, i want to add the 3rd line item in the sales order as Sample with different Material number. How go about this. kindly let me.
Regards
RaviHi there,
Enter the material in the sales order & change the item catg manually in VA02.
But free goods & sample materials are dealt differently..
Freegoods is entered as TANN item catg along with nornam TAN item in standard order OR.
But sample materials or free of charge items are processed through different order type FD for eg.
Even thought the item catg proposed in FD is TANN,, the whole process will not have pricing as TANN items arenot relevant for pricing.
Regards,
Sivanand -
How user can get a Sales Text for the any Line Item in the Billing?
Salute Masters ! !
How user can get a Sales Text for the any Line Item in the Billing?
It's coming for other Order (Line Item for Bought out Item at Project Site - Some Item they procure at project site & complete the task).
Where I can configure in system for all.
Rgds
Srivastav
09973504950Hi,
Sales text can be copied from customer to order , order to delivery and delivery to billing .
Check the T-code : VOTXN , do the customization as per your requirement.
check the below link :
http://help.sap.com/saphelp_erp60_sp/helpdata/en/dd/55f993545a11d1a7020000e829fd11/content.htm -
Bapi to copy the PO line item below the existing PO line item
Hi All,
I am new to work on BAPI, Can any one help me out,
Requirement is to copy the PO line item below the existing PO line item (Replicate the line item for returns purpose) . So is there any bapi to do this task.
Thanks in Advance
Pallavi
Moderator Message: Please employ the SAP procedures to identify the right BADIs and Exits and help yourself.
Edited by: kishan P on Nov 16, 2010 1:56 PMHi,
What i think is you should use two BAPI one is BAPI_PO_GET_DETAIL to fetch existing details of line items and then BAPI_PO_CHANGE to create s second one.
Nabheet -
My Deskjet 1056 cuts the last line off of the page
My Deskjet 1056 cuts half the last line of every page off. No matter what I'm printing from where. I've tried changing margins and printing areas and borders. I've heard to try changing the drivers to 990c or 450 . neither make a difference. Changing the port from bidirectional makes it worse. Even tried to change the print processor modes. No luck. Does anyone have any suggestions. When I print and alignment page the squares at the bottom print just fine and align the page just fine so that doesn't help either. I run on Windows7 I don't know if that has anything to do with it. PLEASE HELP. Thanks in advance
Hi ! Welcome to the HP Forums. I understand you are having an issue with printouts being cut off at the bottom when printing to your HP Deskjet 1056 All-in-One printer from your Windows 7 computer. I'd love to help you with this. The first thing I would suggest would be to make a copy on the printer itself. If the bottom of the page is cut off, then it could be an issue with the hardware. If the copy comes out fine, then we know the hardware is functioning properly. If the copy comes out fine, I would suggest installing the full feature software for you printer if you haven't already. You can download the software here: HP Deskjet Full Feature Software and Drivers If that doesn't resolve the issue please download and run the HP Print and Scan Doctor and let me know of any errors or messages you receive. Have you tried printing multiple documents? Or printing from alternate programs to see if it might be an issue with a specific document or program? I look forward to hearing back from you and working towards a resolution. Thanks for posting!
-
Cumulative amount in the same line item for the same account
Hi
I have an account which appears more than once in the same accounting document.Can I cumulate the amount in the same line item.
IF it's possible, please how can i do it.
Thanks in advanceHi Maher,
Assumption:
You have an accounting document in which more than one line item is there with the different amount. All the other details of the line items are same.
Solution:
If you want to make it one line item, key the amounts as zero in other line items and add the value to a single line item.
Warm regards,
Murukan Arunachalam -
How could i enter 100 materials in the single line item in the repair order
Hello SD Guru's
The below requirement is related repair process.Can you please suggest how i can go head.
I have a one requirement related to repair process in SAP SD. As of now the the repair order creating for only one material in the single line item. But the requirment is if they returned morethan 100 material from same customer, how to process that in systme prospective and standard SAP.
The standard SAP working based on single material for each line item so that the repair indicatior is triggered for that single material only. So how cound i enter multiple materials in the single line item and how could i create 100 materilals in the sigle line item and how could the repair indicatior triggered for that line item which is having 100 materials
Thanks in advnce
Thanks
KVHello Chakrapani,
Thankyou for your quick responce.
How it could be possible if it is possible in SAP.
Can you please suggest how can we achive in this scenario.
Thanks & Regards,
KV -
I have a requirement where in i have to display a pop up with all the line items given by user in ME21N . The pop up has to display when user presses CHECK .
I written the code in the exit EXIT_SAPMM06E_017 . its working fine for single line item.
In case of multiple line items the popup appears for every line item instead of showing all the line items in a single pop up since in the user exit there is no provision of capturing the LAST LINE ITEM . The field EKKO-LPONR which captures the last line item , is populated only after the exit is triggered which captures the value of EKPO-EBELP( line-item). I manage to capture the line items in internal table but unable to capture last line item and then display the internal table in pop up .
If the user gives two line items say 10 , 20 .
Line item 10 is populated to field EKPO-EBELP . After the control comes out of the exit the value of EBELP is assigned to LPONR . At next control LPONR = 10 and EBELP = 20.
Thanks .Hi Priya,
To show popup for the last line item, try with this logic:
You have an internal table with all line items, take an internal table with same structure. Take the number of lines and read the line iten into work area and append this work area into another table. after that read this second internal table with EBELN and EBELP, if it is matching then show the popup for all line items from first internal table.
Put this code:
<b>dsescribe int_first into ws_lines.
if ws_lines gt 0.
read table int_first into wa_first index ws_lines.
if sy-subrc eq 0.
append wa_first to int_second.
endif.
endif.
if not int_second is initial.
read int_second into wa_first with key EBELN = 'structure ebeln value'
EBELP = 'structure ebelp value'
if sy-subrc eq 0.
" put POPUP code
endif.
endif.</b>
Hope it will solve ur problem. -
here's an example of a paragraph i've taken from wikipedia:
if you can see, in the paragraph aligned with the button "Justify with the last line aligned left" - the one above, i've marked with red lines the places in which a gap occurs all of a sudden, and i cannot undo them.
for the same paragraph below i used the simple "Align left" button.
can anyone please help me understand what has happened that made those gaps occur.
i use Adobe Design Standard CS 6 Middle East Version. this bug occurs in other font/languages as well.Thank you for providing the sample IDML file.
I still think it could be the used paragraph composer, maybe in conjunction with the used font. I'd change the composer to see, if the problem will go away.
@Willi – you are right, the story direction is RTL, but the paragraph direction is LTR. That's no surprise here since the ME version of InDesign was used.
I would change story direction to LTR, use the "normal" paragraph composer instead the global one.
Since the used font is not available to me, a substituted font is not showing the problem.
But that may mean nothing. I do not use the ME version of InDesign…
Uwe -
I cant't read the last line in the grid
hello,
I use a grid to display a SQL query with a field-entry
When I loop through the grid, I manage to read all lines except the line or the cursor, it keeps the old value
Do you have an idea
Thank youIt's my code
Shared Sub ItemEvent_Maj_emplacement_lot(ByRef FormUID, ByRef pVal, ByRef BubbleEvent)
Dim EventEnum As SAPbouiCOM.BoEventTypes
EventEnum = pVal.EventType
If pVal.ItemUID = "1" Then
Dim jj As Integer
EventEnum = pVal.EventType
If EventEnum = BoEventTypes.et_CLICK Then
oform = SBO_application.Forms.Item(FormUID)
oitem = oform.Items.Item("MyGrid")
oGrid = oitem.Specific
Dim ColNum = oGrid.Columns.Count
Dim OgridCodeItem As Long
Dim OgridCodeMag As String
Dim OgridCodeLot As String
Dim OgridEmplacement As String
If oGrid.Columns.Count = 0 Then
Exit Sub
End If
For jj = 0 To oGrid.Columns.Count
Try
OgridCodeItem = oGrid.DataTable.GetValue(1, jj)
OgridCodeMag = oGrid.DataTable.GetValue(2, jj)
OgridCodeLot = oGrid.DataTable.GetValue(3, jj)
OgridEmplacement = oGrid.DataTable.GetValue(5, jj)
' This field OgridEmplacement is This field keeps the old value only on the last line before
' On the other lines, it works well
Catch oEx As Exception
' MessageBox.Show(oEx.Message & " jj = " & CStr(jj))
' Exit Sub
End Try
Next jj
End If
End If
End Sub -
How to only read the last line in the text file by using BufferedReader ?
Dear all,
Hello, I am new to Java. Do anybody know how to read the last line (this is the last record) in the text file.The method I am now using is reading from the first line until I reach the last line in the text file. Thank you!!
BufferedReader br = new BufferedReader(new FileReader("c:\\sdk1.4.1\\bin\\dbExport.txt"));
DataInputStream in = new DataInputStream(new FileInputStream("c:\\sdk1.4.1\\bin\\dbExport.txt"));
String input;
String firstinput;
String secondinput;
int count=90;
int year=1955;
while ((input = br.readLine()) != null) {
firstinput = input.substring(0, 10);
secondinput = input.substring(10);
String insertStore1 = ("INSERT INTO AUTHORS " +
"VALUES ('" + count + "', '" + firstinput + "', '" + secondinput + "', 1955)");
System.out.println(insertStore1);
int result = stmt.executeUpdate(insertStore1);I suppose you could use a java.io.RandomAccessFile.
-
Can I align the last line of a text container to to bottom of a container?
Is it possible to take the last line in a text container and vertically align it to the bottom? I'm aware that I can justify the entire text container vertically to achieve this effect. However, this means tha every line in the container is now spaced out with increased leading.
Here's a screen capture of what I mean.
On the right is a text container without any vertical justification and sized to fit the text. On the left is a text container that I've sized to match the height of the right container. In order to get the last line to align to the bottom I used the Justify vertically option. But my bullets are now spread out.
Basically I just want the last line aligned to the bottom and the rest of the text above it to be aligned to the top.
Is there anyway to do this with just one text container? Or will I be forced to used two text containers?
I'm using InDesign CS5 if that matters.I think I'd do this with a two-cell table.
-
To split the payment document value as per the line items of the P O
To split the payment document value as per the line items of the purchase order in the period of payment, so that the payment amounts are measured against the Capex order assigned as account assignment in the purchase order.(Account assignment tab for the individual line item in the PO.
Example:
Inputs:
Purchase Order 3100012345, line item 10 value 6000 line item 20 value 4000
VAT @10% , account assignment for PO line item 10(Internal Order no 10001) & line item 20 Internal Order 10002) G/ R no 5105105101 for Rs10,000.
The I/R doc 501501501 appears as follows: (MIRO)
Line 10: Value Rs 6,000
20: Value Rs 4,000
VAT Rs 600
Rs 400
Total Rs11, 000
Withholding Tax Rs 1,100
The accounting entry for MIRO happens as follows: doc 2102102101
GR/IR Dr Rs 10,000
VAT Dr Rs 1.000
Vendor Cr Rs9, 900
TDS due Cr Rs1, 100
The business expects the payment report as follows:payment doc 2001200101
PO Line item Internal Order MIRO Invoice Payment Payment period Amount
A/c doc number doc number
3400012345 10 10001 5605605601 2102102101 2001200101 001/2009 5940
3400012345 20 10002 5605605601 2102102101 2001200101 001/2009 3960
Currently we are able to show the amounts as Rs 6000 for line item 10 & Rs 4000 for line item 20.
The problems faced.
1. The VAT line items are auto created, hence the reference of purchase order number and line item are not available. So the VAT portion which is part of payment liability does not get reflected against the PO.(not able to show the VAT portion , when we try to show the payment amount per PO line item.)
2. The withholding tax is also a problem; WHT is not calculated and assigned per line item. It is calculated on the total amount of basic and VAT. Because of these reasons, the payment could not be shown properly according to the line item of the purchase order.
3. When part payment is made, against invoices, there is no provision to assign a payment amount against a particular line item. Further, when final payment is made in different period, the clearing document will get generated. That adds to the complexity of differentiating full payments and part payments final clearing.
4. When residual payment is made, a new line item is created. Here assignment of Purchase order line item against payment for residual items become a problem.
5. Many a times advance payments are made. Later the invoice is created and balance payment is made. In those situations, the clearing document creates one more line item and makes payment for the balance item. This adds complexity in bringing balance payment alone and to split as per the purchase order line item. The clearing document number system is multi dimensional. It creates two line items for the same item (one at the time of advance and another the time of clearing.)
6. When full payment is made, the payment document number and clearing document numbers are same. In cases of subsequent or partial or residual payment, the document numbers are different. Because of this, the part payment amounts are shown in the period, where the final payment and clearing are made.
Please suggest a way to split the payment amount in the exact posting period with all the considerations given above.
Regards
Sundararajan
Edited by: Sundarajan Venkatachari on Sep 30, 2009 11:04 AMHi,
See Note 301077 - User exits for the interface to accounting, although I think that there isn't this kind of option. Note 429117 - Collective note advice note SD-FI interface will be useful too.
I think that SAP Note 1085921 - Document split perhaps will help you
Regards
Eduardo
Maybe you are looking for
-
Can I share an icloud account with my wife but not share contacts?
My wife and I want to share the same icloud account. We both have iphones, and our contacts are getting messed up. Is there a way of storing our contacts separately? Or do I need to create a new icloud account for my wife? If so, how do I do that, as
-
Hi I have a question about shooting in Raw with my Canon EOS 6d. I'm in the process of learning photography and my goal was to start shooting in raw. I have Photoshop CS5. When I tried to edit my images in raw I received an error message stating, "Th
-
Explain User exit concept with simple example
Hi friends I am new member of this forum & i am learning ABAP. Kindly send me user exit concept with simple example to my mail ID so i can able to use it. mail ID [email protected] thanks in advance Thanks & Regards
-
Why does LabVIEW for Lego Mindstorms have 2 Functions Palettes?
LabVIEW for Lego Mindstorms has 2 separate Functions Palettes. One of them appears when one creates a VI (.vi) for a Project (.lvrbt), and it appears to contain Mindstorms NXT functions. The other appears when one creates a stand alone VI (.vi), an
-
Delta Platinium restarting problem
Hi, first time posting a problem here (why.....) my board: K7n2 Delta Platinium (bought a month ago) All worked fine untill...Yesterday i installed heatsinks to the mofsets, run super PI and Prime with 1.425 of voltage, all good, then turn off the co