Decimals in Qty and Price in Table control
Hi All,
I have having two issues with decimals in table control.
1. I have a field defined as type KWMENG in the Internal table that is mapped to the table control. I also gave the REF FIELD in the
field properties as it is a QTY field and FORMAT as QUAN.
Issue: THe issue here is the data is displaying as 100.000. As this is a QTY field we want it to show just 100.
I tried changing it to CHAR field and display but this will not work for me as i am using this data later in some calculations.
2. The other issue is with the PRICE field. I have defined as type KWERT in the internal table mapping to the table control. I gave
FORMAT as DEC in field properties.
Issue: The issue here is when the calculated value is say 5.60 it is displaying as 5.00.
Does anyone has any idea. I think i am missing something but not sure what it is.
Thanks in advance,
Karuna.
hi,
u can achieve it thru SP_TransactionNotification
try this code
-- Block GRPO if in Excess in PO Qty
IF @transaction_type IN (N'A', N'U') AND (@Object_type = N'20')
begin
if exists (SELECT T0.BaseEntry, SUM(T0.Quantity)
FROM [dbo].[PDN1] T0 INNER JOIN [dbo].[POR1] T1 ON T1.DOCENTRY = T0.BASEENTRY
WHERE T0.BaseType = 22 AND T0.ItemCode = T1.ItemCode AND T0.BaseLine = T1.LineNum and T0.DOCENTRY = @list_of_cols_val_tab_del
GROUP BY T0.BaseEntry
HAVING (SUM(T0.Quantity) > SUM(T1.Quantity)) or sum(t0.quantity) > sum(t0.BaseOpnQty))
begin
select @Error = 10, @error_message = 'GRPO quantity is greater PO quantity'
end
end
fidel
Similar Messages
-
How to forbid any further changes for PO (QTY and price ) after it has been
Hi,
How to forbid any further changes for PO (QTY and price ) after it has been done GR and LIV? Thanks.Hi,
Price anyway cannot be changed once GR is posted on the PO item, it can be changed only by cancelling the GR, the same applies to IR too.
But quantity can be changed at any time.
So if you are looking at blocking qty too, then a customized message through save exit is the option, I am not aware of any standard SAP messages that can be configured to achieve this..
Ramesh -
How to forbid any further changes for PO (QTY and price )?
Hi,
How to forbid any further changes for PO (QTY and price ) after it has been done GR and LIV? Thanks.Better to post this in logistic forum.
THere will be some config option to do so but normal FI perosn would need to dig deep, a MM perosn should answer quickly.
Reg
Hein -
Why do we need to code loop statement in both PBO and PAI in Table control
Hi friends,
i have 2 questions-
Q1-why do we need to code a loop and endloop statement in both PBO and PAI in Table control,sometimes even empty as well?
Q2-what r d dynpro keywords?Hi,
It is required to pass information from internal table to table control so we loop it in PBO and to get the updated information back, we loop in PAI and update internal table content.
To get more knowledge on Table controls check these threads -
table control
Table Control
Hope this helps.
ashish -
Open order qty,Delivered qty,issued qty, and closing stock---Tables
Gurus,
I need to Prepare a report which will show open order qty,Delivered qty,issued qty, and closing stock.
Please help me with table names where i can find .
Regards
venu gopalHi,
Try EKPO & EKBE tables..
Thx
Raju -
Qty and Price changes in GR(PO) Document
Hi All,
One of my client want to restrict the Qty and Unit Price of GR(PO) Document in such a way where a user should not be able to change the Qty and Unit price while posting a GR(PO) Document.
The System what is followed now is :
Say User raised a Purchase Order Of Qty - 5 Tons & Unit Price - 100/-
This Purchase Order will get approved by Manager and then it gets added. Once the Purchase order gets added we post GR(PO) Document copying the same Purchase Order to the GR(PO) Document.
Say We received the material.........Qty - 5.2 Tons...........In this case system should allow to post this quantity and add the GR(PO) Document.
Where as when We received Qty - 6 Tons, System should not allow to post with this Quantity, (Say there should be some variance in Quantity which has to be allowed)
Is there any settings which can be made to achive this????????????
Thanks and Regards,
Sree.hi,
u can achieve it thru SP_TransactionNotification
try this code
-- Block GRPO if in Excess in PO Qty
IF @transaction_type IN (N'A', N'U') AND (@Object_type = N'20')
begin
if exists (SELECT T0.BaseEntry, SUM(T0.Quantity)
FROM [dbo].[PDN1] T0 INNER JOIN [dbo].[POR1] T1 ON T1.DOCENTRY = T0.BASEENTRY
WHERE T0.BaseType = 22 AND T0.ItemCode = T1.ItemCode AND T0.BaseLine = T1.LineNum and T0.DOCENTRY = @list_of_cols_val_tab_del
GROUP BY T0.BaseEntry
HAVING (SUM(T0.Quantity) > SUM(T1.Quantity)) or sum(t0.quantity) > sum(t0.BaseOpnQty))
begin
select @Error = 10, @error_message = 'GRPO quantity is greater PO quantity'
end
end
fidel -
Copying data from excel(more than one row) and pasting into table control
I have a requirement to copy data from excel and have it pasted it into the corresponding fields table control when the user clicks on an icon.For the first part I used a class to copy it from the clip board.By the previous process,I get the data inside an internal table, but even after trying to split the data using 'split at cl_abap_char_utilities=>horizontal_tab into table itab.' it's not working.The table and the excel file are of the same structure.
Does anyone know any cause as to why it might not work?Is there any other way to achieve my objective?
BonHi,
try to get data into internal table as below
TYPES : BEGIN OF ty_data ,
zbukr TYPE payr-zbukr ,
hbkid TYPE payr-hbkid ,
hktid TYPE payr-hktid ,
rzawe TYPE payr-rzawe ,
chect TYPE payr-chect ,
laufd TYPE reguh-laufd ,
laufi TYPE reguh-laufi ,
lifnr TYPE reguh-lifnr ,
vblnr TYPE reguh-vblnr ,
rwbtr TYPE reguh-rwbtr , "uncommented
unique_no TYPE char13 , " Added SAP Doc. No. and current year concate in NEFT,RTGS and Fund Transfer cases
END OF ty_data .
DATA : wa_file LIKE LINE OF it_file ,
wa_data TYPE ty_data .
DATA: it_data1 TYPE kcde_intern WITH HEADER LINE,
wa_data1 LIKE LINE OF it_data1.
start-of-selection.
CALL FUNCTION 'KCD_EXCEL_OLE_TO_INT_CONVERT'
EXPORTING
filename = lv_file1
i_begin_col = '1'
i_begin_row = '4'
i_end_col = '11'
i_end_row = '60000'
TABLES
intern = it_data1
EXCEPTIONS
inconsistent_parameters = 1
upload_ole = 2
OTHERS = 3.
IF sy-subrc = 0.
PERFORM format_data.
ENDIF.
FORM format_data.
DATA : ld_index TYPE i.
FIELD-SYMBOLS : <fs>.
DATA it_tab LIKE wa_data OCCURS 0 WITH HEADER LINE.
LOOP AT it_data1.
MOVE it_data1-col TO ld_index.
ASSIGN COMPONENT ld_index OF STRUCTURE
it_tab TO <fs>.
MOVE : it_data1-value TO <fs>.
MOVE it_data1-value TO p_table.
AT END OF row.
APPEND it_tab.
CLEAR it_tab.
ENDAT.
ENDLOOP.
it_data[] = it_tab[] .
ENDIF.
endform. "format_data -
How to update and retrieve the table control entries and field entries.
Hello everyone,
i have a requirement,
i have company code , plant, fiscal year, posting period fields in the selection screen and then below that i have a table control which contains 4 fields invoice no., check number, check date and amount.
i have to enter the values and when i press SAVE button , these values have to update in a custom table which i had created.
please send me the coding how to do this object.
will be rewarded.
thanks in advance.Hi Suresh
this is actual requirement
in the CAT2.
1. Add a new column for WBS description and derive the value as per the FS
2. Retrieve project number and description and update in the column specified
3. When a service order is selected it should do the same for 2.
4. Finally repeat for the worklist view (which is the section above)
here i am able to display values at data entry area
for service order and network but not worklist area ?
updation is not coming, can u plz go throw it..
Thanks
Chinna -
Creating and accessing a Table control using CL_TABLE_VIEW_MM
Hi everybody.,
I am new to Module Pool Programming using Abap Object Oriented Programming .I need to create a Table Control in my Screen .I debugged the standard ME21n Tracsaction and found that it used class CL_TABLE_VIEW_MM .How can i make use of this class effictively for my Custom Program .Guide me on this .
Regards.,
S.Sivakumarsolved myself
-
How to I link Slaes Orders and Price Assurances - Table VBAK Field AUART
Hello,
Using T-code VA43 I can enter a contract number (we call it a Price Assurance#) and then I can see the information I need 1 for one. I can also pull this info out of the VBAK and VBAP tables using the doc type ZQ in the field AUART. What I am trying to do is link all of these document types to their sales orders, AUART=TA, and then finally link them to the invoices but I am having trouble doing it. Can someone help me figure out how to link the sales documents types ZQ to their corresponsing TA types? From there I can link the billing documents to them.
Thanks,
SeanHi Sean,
As per my understanding of your question is about copy controls,where you copied the standard quantity contract type CQ and
named it as ZQ,now you want to link it up with order type TA(Standard Order),for this you need to maintain copy controls
between your contract and order.Use T.code VTAA select your contract type and sale order type maintain copy controls *(copy
standard CQ - TA and rename it as per your document type) the you need to maintain copy controls between TA to LF use
T.code VTLA the delivery to invoice use T.code VTFL.
Search in Forum or Google for better understanding of copy controls.
Regards
Ram -
How to de-activate Qty and Price fields for Service purchase requisition
Dear all,
We have a request to de-activate (leave it as "Display") the fields of quantity and gross price when changing a service purchase requisition of a specific document type.
In example: We want that purchase requisition type NB, allows in change mode (ME52 or ME52N) to change the quantity and gross price of the services. On the other hand, these two fields must be only visible for order type ZNB. Besides this must be happening only for services.
Changing PT9 or PT9B will affect also the creation, and if we only configure based on transacction and document type does not work.
Any help will be highly appreciatted.
CheersHi,
You may have to write a output requirement routine and assign the same to the output type in NACE.
But i don't think you will get the old and new data of Purchase order in requirement routine (program : SAPLV61B). You may have to export the data into memory from either a BADI method or User exit and then import the same in requirement routine.
Regards
Vinod -
Accounting treatment when there is Qty and price diff in PO Vs GR & Invoice
Hi Experts,
just wanted to understand what is the accounting treatment when there is a difference in PO Vs GR & Invoice.
with regards
Ramesh YHi
If there is Price difference between PO and Invoice following accounting takes place.Lets assume PO value is Rs 90 and Invoice send by the supplier is of Rs 100. and provided you have allowed sufficient tolerence then
1)If material stock exists
then during MIRO
Vendor account Cr 100
GR/IR Clering Dr 90
Stock account Dr 10
2) If material stock doenot exist
Vendor account Cr 100
GR/IR Clering Dr 90
RM Consumption Dr 10
Regards
Sandeep -
MIRO behaviour on qty and price
Hi Consultant,
Need advice and confirmation on below scenario during MIRO if my understanding is correct.
1) scenario 1
PO 100 unit at $1
GR 100 unit at $1
IR 40 unit at $1'
during GR
dr inventory 100
cr gr/ir 100
during IR, system will post despite different from GR. System will treat it like partial
cr vendor 40
dr gr/ir 40
correct?
2) scenario 2
PO 100 unit at $1
GR 100 unit at $1
IR 40 unit at $2 (in vendor invoice stated $2)
during GR
dr inventory 100
cr gr/ir 100
during IR, due to price difference, the difference will go to prd
cr vendor 80
dr gr/ir 40
dr prd 40
3) scenario 3
PO 100 unit at $1
GR 100 unit at $1
IR 120 unit at $1 (in vendor invoice stated 120 unit)
during GR
dr inventory 100
cr gr/ir 100
during IR, if quantity more than GR, i cannot change quantity as need to set off completely with GR. The balance i need to book where?
cr vendor 120
dr gr/ir 100
cr to where ? 20
ThanksHi consultant,
meaning if GR 50 unit but IR vendor invoice is 60 unit, we still need to post 60.
in this case :
migo
dr inventory 50
cr gr/ir 50
miro
dr gr/ir 60
cr vendor 60
1) system will post despite gr/ir different by 10? system will still create 57# document despite gr/ir mismatch?
2) mr11 is to clear the dicrepancy on gr/ir account?
thanks
rgds -
Make Select rows and columns as read only in Table Control
Hi All,
I would like to know how to make certain cells in a Table Control as display only.
Table control should look like-(Those in bold are read only or in display mode)
<b>Name1 Idno1 </b> Address1
<b>Name2 Idno2</b> Address2
<b>Name3 Idno3 </b> Address3
<b>Name4 Idno4</b> Address4
(Blank row to enter name idno and address)
(Blank row to enter name idno and address)
(Blank row to enter name idno and address)
My table control should display all the above fields the way it is above of which first two colums and 4 rows should be read only,and the rest of the empty rows in the TC should be in change mode.i.e it must have provision to add new rows but not change the first two columns of existing rows.
In short I am looking at solution to hide particular no of rows and columns and <b>not the entire column.</b>In the PBO of the table control loop. just write these statements
NAME and IDNO considering the fields on the screen.
and WA_TAB is the table work area being passed to the table control to display the rows.
if not WA_TAB-NAME is initial and not WA_TAB-IDNO is initial.
loop at screen.
if screen-name = 'NAME' or
screen-name = 'IDNO'.
screen-input = <b>0</b>.
modify screen.
endif.
endloop.
endif.
which means that the fields are disabled only if NAME and IDNO are not initial.
Regards
- Gopi -
What are the uses of table control and tabstrip control
can anyone tell me the uses of table control and tabstrip control
Hi,
table control is more comfortable for customizing.scroll bars all possible in this.where as it is not possible in step loops.
check this example.
PROGRAM ZBHTCTRL.
TABLES: LFA1, EKKO.
DATA: OKCODE1 LIKE SY-UCOMM,
OKCODE2 LIKE SY-UCOMM.
CONTROLS TABC TYPE TABLEVIEW USING SCREEN 1001.
DATA: BEGIN OF ITAB OCCURS 0,
MANDT LIKE EKKO-MANDT,
EBELN LIKE EKKO-EBELN,
BSTYP LIKE EKKO-BSTYP,
BSART LIKE EKKO-BSART,
END OF ITAB.
MODULE USER_COMMAND_1000 INPUT.
CASE OKCODE1.
WHEN 'BACK'.
SET SCREEN 0.
WHEN 'NEXT'.
SET SCREEN 1001.
SELECT * FROM EKKO INTO CORRESPONDING FIELDS OF TABLE ITAB WHERE
LIFNR = LFA1-LIFNR.
ENDCASE.
ENDMODULE. " USER_COMMAND_1001 INPUT
MODULE MOVE_DATA OUTPUT.
EKKO-MANDT = ITAB-MANDT.
EKKO-EBELN = ITAB-EBELN.
EKKO-BSTYP = ITAB-BSTYP.
EKKO-BSART = ITAB-BSART.
ENDMODULE. " MOVE_DATA OUTPUT
MODULE USER_COMMAND_1001 INPUT.
CASE OKCODE2.
WHEN 'BACK'.
SET SCREEN 1000.
ENDCASE.
ENDMODULE. " USER_COMMAND_1001 OUTPUT
MODULE STATUS_1001 OUTPUT.
SET PF-STATUS 'MENU'.
SET TITLEBAR 'TIT'.
ENDMODULE. " STATUS_1001 OUTPUT
MODULE STATUS_1000 OUTPUT.
SET PF-STATUS 'DMENU'.
SET TITLEBAR 'xxx'.
ENDMODULE. " STATUS_1000 OUTPUT
FORM ON_CTMENU_FORM1 USING CMENU TYPE REF TO CL_CTMENU.
CALL METHOD CMENU->LOAD_GUI_STATUS
EXPORTING
PROGRAM = ' ZBHTCTRL'
STATUS = 'CMENU'
MENU = CMENU.
CALL METHOD CMENU->ADD_FUNCTION
EXPORTING
FCODE = 'RX'
TEXT = 'RECIEVE'.
ENDFORM.
FLOW LOGIC:
PROCESS BEFORE OUTPUT.
MODULE STATUS_1000.
PROCESS AFTER INPUT.
MODULE USER_COMMAND_1000.
PROCESS BEFORE OUTPUT.
MODULE STATUS_1001.
LOOP AT ITAB WITH CONTROL TABC CURSOR TABC-TOP_LINE.
MODULE MOVE_DATA.
ENDLOOP.
PROCESS AFTER INPUT.
MODULE USER_COMMAND_1001.
LOOP AT ITAB.
ENDLOOP.
for more info check this link.
http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/dbac1d35c111d1829f0000e829fbfe/content.htm
thanks
Ashu.
Maybe you are looking for
-
70" Sharp LED-LCD TV as monitor for Mac Mini?
I just purchased a 70" Sharp LED-LCD TV---considering buying a Mac Mini to watch TV online and ditching my DirecTV. TV resolution is 1920 x 1080. Will I be able to get a High Definition picture as clear as HD DirecTV this way?
-
How to get field label in downloaded file
Hi, How to get filed labels, when we download a report to an Excel sheet? Thank U
-
I want to make three HDD partitions on Satellite A200-1GB
Hi all, Yesterday night I noticed that there is a small sound comes out when Hard disk is being read. The sound same as the Desktop Hard disk sound. In desktop HDD's that's normal. I thought that Notebook's HDD doesn't sound like that even it has the
-
How do I decide which size is better? I have the space, but not sure that bigger is better due to eye strain, etc. Please advise!
-
Rollover state not working on type
I have type that is supposed to act as a hyperlink. I've enabled it, and selected the color, etc. It looks fine in iweb, but when i publish it, there are no rollover states at all. The only thing I can think of, is that i've put a drop shadow on the