Problem in Decimal Rounding in FMS Query
Dear All,
When an FMS is executed and if the result is 8.6760 (Desired result) but the actual result shown in SAP is 8.6800.
And please note that I have fixed the decimal places to 4. Y is my FMS not giving the correct output (without the rounding).
Thanks in Advance,
Vasu Natari.
Hi Vasu
Go to -> Document Settings second tab per document-> Check the sales documents, you must have flaged the option Automatic Rounding for Document
For the abouve reason the SAP is rounding the Value but You FMS is not doing
Regards
Sandeep
Similar Messages
-
Hi Robert ,
This is going too long ..let me give you the total procedure at once .
1.Shift+ Alt +F2 on the filed where you want to have your formatted search
2.Assign your query
3.Click on Auto refresh when field changes
4. Customer/Vendor code
Refresh regularly
(If you are using Formatted search on Header level )
Me....I am not using FMS at header level.
You won't see Customer/Vendor Code if you are using it at row level .In that case you have to use Display user defined values otherwise you will have problem using auto refresh at row level .
One other thing -
Me.....I have done this. "Display saved user defined values" is marked. It's still not functioning properly.
1.What is your Userdefined field ?
Me....U_DEFGL
2. What is the values you are stored ..for example -
Select U_..... from OCrd where CardCode='Norm Thompson'
Me....The stored value is whatever GL account the user typed into the UDF for the business partner.
If you let us know then , we can do more troubleshooting . I guess open a new thread and we will start from there ... this is getting too long ..
Bishal
Me.....My problem is that after linking the fms query to the G/L Account field on the AP Invoice (not that is in the rows, not header section) I can't tab or click out of the field. SAP keeps popping up the stupid G/L Account List form (which is blank) and even if I close it SAP just keeps popping it up. Thus I believe something is wrong with the settings on my User Defined Values Setup form. Which I posted before, but here they are again.
1. Query is selected and works properly
2. Auto refresh marked
3. Drop down set to "When field changes"
4. From the fields drop down list set to "Document Number". I don't see what the significance of this is, but I have tried selecting different fields and still the G/L Account List form pops up repeatedly.
5. Display Saved User-Defined Values
Any ideas? This is basic FMS and if SAP would produce a simple and EASY to find document to explain the steps I wouldn't have to bug you guys. But SAP doesn't so here I am. Thanks for any insights.Hi Robert,
I think your issue is coming because your user is typing the data instead of selecting .
1.Use this query (as formatted search ) in your user defined field of Business partner Master Data. So user will select the list of account
Select FormatCode from OACT where ActType=... to make your list shorter .
User will press shift +F2 and then he/she will see the list of the code and select it .
2 . You have already configured your second formatted search
-- Select U_Defgl... from ocrd where
-- autorefresh when item no no changes -display user defined values .
Now test your stuff ,it should work .
Let me know if it didn't work .
Thank you
Bishal
Edited by: Bishal Adhikari on May 28, 2009 9:28 AM -
Problem in VAT Round off during MIRO
Hi Friends,
I having problem in VAT round off during MIRO. We have created PO with excise +VAT. VAT amount has been rounded off. After GRN, we are trying to post the Invoice in MIRO, the VAT amount shows with Decimal.
We are using TAXINN, in the tax pricing proceedure i have mede 17 for call type for VAT condition type. in OB90 we have mede the rounding rule as 100 for currency INR.
When i create the FI direct invoice using the same Tax code it works fine, but having problem in MIRO. I want the decimal should be rounded to the nearest value.
Can any one help me is there any standard set up where we can arrive this?? OR is it required any user exit??
Regards,
DevaCheck whether you can use the user exit function module KR_USER_EXIT_ROUNDOFF
Regards,
SDNer -
Q: Problem related to Rounding of quota
Hi Experts,
My rounding requirement is if Quota less than 0.4999 day is disregarded, 0.4999 and above shall be rounded up to 1 day.
I have a problem with following Rounding rule which is configured by me.
26 001 000000 0.49998 x 000000 x
26 002 0.49999 x 1.00000 1.00000 x
When I am inserting the above rounding rule (26) to selection rule- The quotas are not at all getting not generated.
With out this assignment the quotas are getting generated.
Do I need to configure anything else to get the desired output or is there anything wrong in my rules?
Thx
ThomasWilfred Krens,
Thanks for your time.
Quotas were not getting generated bcos I had given the rounding rule > SELECTION rules>tab accrual entitlement.
Bcos of that, the quota was getting rounded on daily basis and finially output was zero.
*Now I have solved issue.*
By giving the rounding in-> SELECTION rules> Total entitlement tab
Now I changed the rule as
26 001 0.49998 1.49999 x 1.0000 x.
My understanding is as follows -
The decimal part of the lower limit and upper limit should be same .
Regards
Thomas
Edited by: Thomas Padiyara on Nov 19, 2008 8:19 AM -
Hello, I recently created an FMS query which pulled all expense gl accounts. I linked the query to a UDF on business partners. This way my users could select a default GL account for a business partner which would appear automatically on the ap invoice. It was working fine, but now the fms query on the BP UDF is failing, returning no results. I also get NO error messages either so I don't know why its failing.
I can run the fms query in Query Manager fine.Hi Robert ,
Press Shift +F2 on your User Defined field and you will see the list of accounts .
Your problem will be solved .There is no issue with query .
Thank you
Bishal -
I created an fms query so my users could pick a default GL account and save to a UDF on the BP window. This query is now working fine. I then created a 2nd fms query and attached it to the "G/L Account" field on the AP invoice window so that when a vendor is selected and the user clicks on this field the GL account from the vendor's UDF will default.
My problem is that the G/L Account field on the AP Invoice doesn't have a magnifying glass and shiftF2 does nothing. If I go to tools/customize/User-Defined Values Setup it immediately shows the query I have linked to the field. If I press ShiftF2 I get an "Internal error 8180". If I go to Query Manager and run my query it errors out with a long msg saying "Microsoft SQL Native Client SQL Server incorrect syntax near '$[$4.0.0]'.2. Microsoft SQL Native Client SQL Server Statement activities OCLG (s) could not be prepared.
Below is my query which I copied from one of Gordon's prior posts. It worked fine last week and we have made no changes. My user defined field is DGL. For some reason the forum changes the code below, but at the very end it should read dollar sign, open parenthesis, dollar sign, 4 dot 0 dot 0, closed parethesis.
Select T0.U_DGL from dbo.OCRD T0 Where T0.CardCode = $[$4.0.0]Hi Robert,
Try this query:
SELECT T0.\[U_DGL\] FROM OCRD T0 WHERE T0.\[CardCode\] = $\[$4.CardCode\]
Regards,
Adrian -
I need a Small FMS query.
hi.
i need a small fms query i am not able to do it.
what is my requirement is
i create one Udf field which is amount type at sales order rows.
and in item master i enter some values at factor1 under sales data.
when ever i pick the item at sales order row level..
i need a calculation like
row level i enter like this
itemcode manual price(udffield)
001 25
001 is having factor1 value at item master is 5
then i need calculation like
select ((t2.SalFactor1 *100/100)*(t1.U_Manpric)) as ManualPrice from ordr t0 inner join rdr1 t1 on t0.docentry = t1.docentry inner join oitm t2 on t2.itemcode = t1.itemcode where t2.ItemCode ='00201010001'
i need above calculation
i tried
select ((t2.SalFactor1 *100/100)*($[$t1.U_Manpric.0.0])) as ManualPrice from ordr t0 inner join rdr1 t1 on t0.docentry = t1.docentry inner join oitm t2 on t2.itemcode = t1.itemcode where t2.ItemCode ='00201010001'
but not working
Any information plz update me.hi.
Kenady t
thanks for your reply.
if i press picker it is showing nothing i mean no error is comming
values is 0.0 is coming.
if i press that line i mean i just put the cursor on the line empty line if i open the query at user defined query
no data was found coming..
may i know why it is comming
if i see the item master it is having factor 1
why it is comming i dont know.
i am checking diff diff scenario
i have some questins
1) is the item should have instock
i was thought earlier this is problem
but some items are having stock but still above problem is comming
2) if the item is belongs to service , is above will work.
i think it should work.
but in that point also i am checking.
plz update me what's wrong.. -
My dvd player will not let me change regions, it says i have one more chance to change it, then it just quits when i do, now its stuck on region 1. Any thoughts how i can solve this problem or get round it in some way?
Usually if you have some kind of hardware failure there is some beeping during POST or most motherboards now have LED indicators to produce and error message based on the type of failure
So if its bad memory, not place properly, mismatched, processor not inserted properly, mismatched voltage or voltage connector not present etc it beeps or generates the error id.
Power supplies can be tested for failure. There are some walk throughs for testing just them with a switch, paperclip or a jumper (I'd suggest not doing this if you are not familiar with the dangers of electricity).
Memory can be tested with memory diagnostics programs like Memtest+
Processors can overheat if the proper precautions have not been taken usually you will get a POST beep or error code for that.
If the motherboard has no response then do the basics first:
Check power connectors and power supply. Once you determine that is not the case move on to other items like graphics cards in all the way or memory. -
Hi Experts,
I'm having a problem with decimal.
I have a alv data grid that can be edited.Once I press enter the value for the decimal fields are changed.
Example: If i input 5.00 in the field then I press enter it converts it to 0.05
And If I input 2.01 in the field it shows an error Too many decimal places(Maximum 0)
DATA INPUT for my internal table:
DATA: BEGIN OF it_data OCCURS 0,
docno LIKE zit_haul_line-docno,
line LIKE zit_haul_line-line,
eqpno LIKE zit_haul_line-eqpno,
rpt LIKE zit_haul_line-rpt,
notrip LIKE zit_haul_line-notrip,
trc LIKE zit_haul_line-trc,
escfee LIKE zit_haul_line-escfee,
tollfee LIKE zit_haul_line-tollfee,
repr LIKE zit_haul_line-repr,
others LIKE zit_haul_line-others,
tba LIKE zit_haul_line-tba,
dik LIKE zit_haul_line-dik,
locorg LIKE zit_haul_line-locorg,
locdes LIKE zit_haul_line-locdes,
END OF it_data.
DATA: wa_data LIKE it_data.
Here is my code in change ALV Change.
FORM data_changed USING ir_data_changed TYPE REF TO cl_alv_changed_data_protocol.
DATA ls_modi TYPE lvc_s_modi.
DATA: ratepertrip LIKE zit_haul_line-rpt,
nooftrip LIKE zit_haul_line-notrip,
lv_value TYPE lvc_value ,
totalrent LIKE zit_haul_line-trc,
escortfee LIKE zit_haul_line-escfee,
tollfee LIKE zit_haul_line-tollfee,
represent LIKE zit_haul_line-repr,
others LIKE zit_haul_line-others,
lv_value1 TYPE lvc_value,
totalbill LIKE zit_haul_line-tba.
DATA: eqpno LIKE equi-equnr,
gv_equnr LIKE equi-equnr.
* Check each modification:
LOOP AT ir_data_changed->mt_mod_cells INTO ls_modi.
CASE ls_modi-fieldname.
WHEN 'EQPNO'.
CONDENSE ls_modi-value.
SELECT SINGLE equnr
INTO gv_equnr
FROM equi
WHERE equnr EQ ls_modi-value.
IF sy-subrc NE 0.
CALL METHOD ir_data_changed->add_protocol_entry
EXPORTING
i_msgid = '00'
i_msgty = 'E'
i_msgno = '398'
i_msgv1 = 'Equipment Number does not exist:'
i_msgv2 = ls_modi-value
i_msgv3 = ''
i_msgv4 = ''
i_fieldname = ls_modi-fieldname
i_row_id = ls_modi-row_id.
ENDIF.
ENDCASE.
CALL METHOD ir_data_changed->get_cell_value
EXPORTING i_row_id = ls_modi-row_id
i_fieldname = 'RPT'
IMPORTING e_value = ratepertrip.
CALL METHOD ir_data_changed->get_cell_value
EXPORTING i_row_id = ls_modi-row_id
i_fieldname = 'NOTRIP'
IMPORTING e_value = nooftrip.
CLEAR totalrent.
ls_modi-fieldname = 'TRC'.
IF ratepertrip = ''.
ratepertrip = 1.
ELSEIF nooftrip = ''.
nooftrip = 1.
ENDIF.
totalrent = ratepertrip * nooftrip.
CALL METHOD ir_data_changed->modify_cell
EXPORTING i_row_id = ls_modi-row_id
i_fieldname = ls_modi-fieldname
i_value = totalrent.
CALL METHOD ir_data_changed->get_cell_value
EXPORTING i_row_id = ls_modi-row_id
i_fieldname = 'ESCFEE'
IMPORTING e_value = escortfee.
CALL METHOD ir_data_changed->get_cell_value
EXPORTING i_row_id = ls_modi-row_id
i_fieldname = 'TOLLFEE'
IMPORTING e_value = tollfee.
CALL METHOD ir_data_changed->get_cell_value
EXPORTING i_row_id = ls_modi-row_id
i_fieldname = 'REPR'
IMPORTING e_value = represent.
CALL METHOD ir_data_changed->get_cell_value
EXPORTING i_row_id = ls_modi-row_id
i_fieldname = 'OTHERS'
IMPORTING e_value = others.
CLEAR totalbill.
ls_modi-fieldname = 'TBA'.
totalbill = escortfee + tollfee + represent + others.
totalbill = totalrent + totalbill.
CALL METHOD ir_data_changed->modify_cell
EXPORTING i_row_id = ls_modi-row_id
i_fieldname = ls_modi-fieldname
i_value = totalbill.
ENDLOOP.
ENDFORM. "data_changedHi,
Can you check my code. I've tried changing the data types of my internal table and my output is stll same when I press enter.
The output should be 2.00 3.00 5.00 7.00
Also if I enter 12345.00 the output should be 12,345.00.
Thank you so much for the help.
* ALV required data objects.
TYPE-POOLS: sdydo, icon, slis.
DATA: w_title TYPE lvc_title,
w_repid TYPE sy-repid,
w_comm TYPE slis_formname,
w_status TYPE slis_formname,
x_layout TYPE slis_layout_alv,
ls_events TYPE LINE OF slis_t_event,
t_events TYPE slis_t_event,
t_fieldcat TYPE slis_t_fieldcat_alv,
x_sort type LINE OF slis_t_sortinfo_alv,
t_sort TYPE slis_t_sortinfo_alv,
ls_heading TYPE slis_listheader,
t_heading TYPE slis_t_listheader,
ls_fieldcat TYPE slis_fieldcat_alv,
gs_variant LIKE disvariant,
gt_events TYPE slis_t_event,
gs_events TYPE slis_alv_event.
DATA:
wa_layout TYPE slis_layout_alv,
wa_events TYPE slis_alv_event,
wa_sort TYPE slis_sortinfo_alv.
TYPES: BEGIN OF t_header,
line01(555) TYPE c,
line02(555) TYPE c,
END OF t_header.
DATA: is_print TYPE slis_print_alv,
gset TYPE lvc_s_glay,
%runmode TYPE aqlimode.
data: it_sortcat type slis_sortinfo_alv occurs 1.
DATA: gw_header TYPE t_header.
" END OF ALV DATA
"========================================================================================================================
DATA: BEGIN OF it_data OCCURS 0,
docno LIKE zit_haul_line-docno,
line LIKE zit_haul_line-line,
eqpno LIKE zit_haul_line-eqpno,
rpt TYPE p DECIMALS 2, "LIKE zit_haul_line-rpt,
notrip TYPE p DECIMALS 2,
trc TYPE p DECIMALS 2,
escfee TYPE p DECIMALS 2,
tollfee TYPE p DECIMALS 2,
repr TYPE p DECIMALS 2,
others TYPE p DECIMALS 2,
tba TYPE p DECIMALS 2,
dik LIKE zit_haul_line-dik,
locorg LIKE zit_haul_line-locorg,
locdes LIKE zit_haul_line-locdes,
END OF it_data.
DATA: wa_data LIKE it_data.
DATA: it_modified TYPE STANDARD TABLE OF zit_haul_line WITH HEADER LINE.
DATA: wa_modified TYPE STANDARD TABLE OF zit_haul_line WITH HEADER LINE.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
PARAMETERS: r_create RADIOBUTTON GROUP rad1 USER-COMMAND a DEFAULT 'X'.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME.
PARAMETERS: r_proj RADIOBUTTON GROUP rad2 MODIF ID A.
PARAMETERS: r_cost RADIOBUTTON GROUP rad2 MODIF ID A.
SELECTION-SCREEN END OF BLOCK b2.
PARAMETERS: r_post RADIOBUTTON GROUP rad1.
PARAMETERS: r_rev RADIOBUTTON GROUP rad1.
SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME.
PARAMETERS: p_docno LIKE mseg-belnr MODIF ID B,
p_post LIKE sy-datum MODIF ID B.
SELECTION-SCREEN END OF BLOCK b3.
SELECTION-SCREEN BEGIN OF BLOCK b4 WITH FRAME.
PARAMETERS: p_trand LIKE sy-datum,
p_cost LIKE csks-kostl,
p_proj TYPE string,
p_wbs TYPE string,
p_nwa TYPE string.
SELECTION-SCREEN END OF BLOCK b4.
SELECTION-SCREEN END OF BLOCK b1.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF r_create = 'X'.
IF screen-group1 = 'A'.
screen-active = 1.
ENDIF.
ELSE.
IF screen-group1 = 'A'.
screen-active = 0.
ENDIF.
ENDIF.
IF r_post = 'X' OR r_rev = 'X'.
IF screen-group1 = 'B'.
screen-active = 1.
ENDIF.
ELSE.
IF screen-group1 = 'B'.
screen-active = 0.
ENDIF.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
START-OF-SELECTION.
PERFORM get_data.
PERFORM display_report.
FORM get_data.
it_data-line = '001'.
APPEND it_data.
it_data-line = '002'.
APPEND it_data.
it_data-line = '003'.
APPEND it_data.
it_data-line = '004'.
APPEND it_data.
it_data-line = '005'.
APPEND it_data.
it_data-line = '006'.
APPEND it_data.
it_data-line = '007'.
APPEND it_data.
it_data-line = '008'.
APPEND it_data.
it_data-line = '009'.
APPEND it_data.
it_data-line = '010'.
APPEND it_data.
ENDFORM.
"ALV DISPLAY ====================================================================================================================================
"& Form PF_WRITE_FIELDCAT
*& Form pf_write_fieldcat
* text
* -->FNAME text
* -->TNAME text
* -->TEXT text
* -->LEN text
FORM pf_write_fieldcat USING fname
tname
text
len
edt.
* key
* sum.
ls_fieldcat-fieldname = fname.
ls_fieldcat-tabname = tname.
ls_fieldcat-seltext_l = text.
ls_fieldcat-outputlen = len.
* ls_fieldcat-key = key.
* ls_fieldcat-do_sum = sum.
ls_fieldcat-edit = edt.
IF len = '0'.
ls_fieldcat-outputlen = '1'.
ls_fieldcat-no_out = 'X'.
ENDIF.
APPEND ls_fieldcat TO t_fieldcat.
CLEAR ls_fieldcat.
* To set ENTER Event!
gs_events-name = 'CALLER_EXIT'.
gs_events-form = 'CALLER_EXIT'.
APPEND gs_events TO gt_events.
* To change the ALV Changed Protocoll
gs_events-name = 'DATA_CHANGED'.
gs_events-form = 'DATA_CHANGED'.
APPEND gs_events TO gt_events.
ENDFORM. " PF_WRITE_FIELDCAT
*& Form display_report
FORM display_report.
is_print-no_print_selinfos = 'X'.
is_print-no_print_listinfos = 'X'.
is_print-print_ctrl = 'X'.
PERFORM pf_write_fieldcat USING:
* 'DOCNO' 'IT_DATA' 'Line' ' ' '',
'LINE' 'IT_DATA' 'Line' ' ' '',
'EQPNO' 'IT_DATA' 'Equipment No.' ' ' 'X',
'RPT' 'IT_DATA' 'Rate per Trip' ' ' 'X',
'NOTRIP' 'IT_DATA' 'No of Trip' ' ' 'X',
'TRC' 'IT_DATA' 'Total Rental Charges' ' ' '',
'ESCFEE' 'IT_DATA' 'Escort Fee' ' ' 'X',
'TOLLFEE' 'IT_DATA' 'Toll Fee' ' ' 'X',
'REPR' 'IT_DATA' 'Representation' ' ' 'X',
'OTHERS' 'IT_DATA' 'Others' ' ' 'X',
'TBA' 'IT_DATA' 'Total Billable Amount' ' ' '',
'DIK' 'IT_DATA' 'Distance in KM' ' ' 'X',
'LOCORG' 'IT_DATA' 'Location Origin' ' ' 'X',
'LOCDES' 'IT_DATA' 'Location Destination' ' ' 'X'.
* Layout
x_layout-zebra = 'X'.
x_layout-no_keyfix = ' '.
x_layout-colwidth_optimize = 'X'.
* GUI Status
w_status = 'SET_PF_STATUS'.
w_repid = sy-repid.
* User commands
w_comm = 'USER_COMMAND'.
* gs_variant-variant = p_var1.
* gs_variant-handle = space.
* gs_variant-report = sy-repid.
gs_variant-report = sy-repid.
gs_variant-username = sy-uname.
gset-no_colwopt = 'X'.
* Displays the ALV grid
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid
it_fieldcat = t_fieldcat
is_layout = x_layout
"it_sort = t_sort
it_sort = it_sortcat
* i_callback_pf_status_set = w_status
"i_callback_user_command = w_comm
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
* i_callback_html_top_of_page = 'TOP_OF_PAGE'
i_callback_top_of_page = 'TOP-OF-PAGE'
* i_callback_html_end_of_list = 'END-OF-PAGE'
is_variant = gs_variant
i_save = 'A'
is_print = is_print
it_events = gt_events
* i_grid_title = w_title
TABLES
t_outtab = IT_DATA
EXCEPTIONS
program_error = 1
OTHERS = 2.
ENDFORM. " display_report
FORM data_changed USING ir_data_changed TYPE REF TO cl_alv_changed_data_protocol.
DATA ls_modi TYPE lvc_s_modi.
DATA: ratepertrip LIKE zit_haul_line-rpt,
nooftrip LIKE zit_haul_line-notrip,
lv_value TYPE lvc_value ,
totalrent LIKE zit_haul_line-trc,
escortfee LIKE zit_haul_line-escfee,
tollfee LIKE zit_haul_line-tollfee,
represent LIKE zit_haul_line-repr,
others LIKE zit_haul_line-others,
lv_value1 TYPE lvc_value,
totalbill LIKE zit_haul_line-tba.
DATA: eqpno LIKE equi-equnr,
gv_equnr LIKE equi-equnr.
* Check each modification:
LOOP AT ir_data_changed->mt_mod_cells INTO ls_modi.
CASE ls_modi-fieldname.
WHEN 'EQPNO'.
CONDENSE ls_modi-value.
SELECT SINGLE equnr
INTO gv_equnr
FROM equi
WHERE equnr EQ ls_modi-value.
IF sy-subrc NE 0.
CALL METHOD ir_data_changed->add_protocol_entry
EXPORTING
i_msgid = '00'
i_msgty = 'E'
i_msgno = '398'
i_msgv1 = 'Equipment Number does not exist:'
i_msgv2 = ls_modi-value
i_msgv3 = ''
i_msgv4 = ''
i_fieldname = ls_modi-fieldname
i_row_id = ls_modi-row_id.
ENDIF.
ENDCASE.
CALL METHOD ir_data_changed->get_cell_value
EXPORTING i_row_id = ls_modi-row_id
i_fieldname = 'RPT'
IMPORTING e_value = ratepertrip.
CALL METHOD ir_data_changed->get_cell_value
EXPORTING i_row_id = ls_modi-row_id
i_fieldname = 'NOTRIP'
IMPORTING e_value = nooftrip.
CLEAR totalrent.
ls_modi-fieldname = 'TRC'.
IF ratepertrip = ''.
ratepertrip = 1.
ELSEIF nooftrip = ''.
nooftrip = 1.
ENDIF.
totalrent = ratepertrip * nooftrip.
CALL METHOD ir_data_changed->modify_cell
EXPORTING i_row_id = ls_modi-row_id
i_fieldname = ls_modi-fieldname
i_value = totalrent.
CALL METHOD ir_data_changed->get_cell_value
EXPORTING i_row_id = ls_modi-row_id
i_fieldname = 'ESCFEE'
IMPORTING e_value = escortfee.
CALL METHOD ir_data_changed->get_cell_value
EXPORTING i_row_id = ls_modi-row_id
i_fieldname = 'TOLLFEE'
IMPORTING e_value = tollfee.
CALL METHOD ir_data_changed->get_cell_value
EXPORTING i_row_id = ls_modi-row_id
i_fieldname = 'REPR'
IMPORTING e_value = represent.
CALL METHOD ir_data_changed->get_cell_value
EXPORTING i_row_id = ls_modi-row_id
i_fieldname = 'OTHERS'
IMPORTING e_value = others.
CLEAR totalbill.
ls_modi-fieldname = 'TBA'.
totalbill = escortfee + tollfee + represent + others.
totalbill = totalrent + totalbill.
CALL METHOD ir_data_changed->modify_cell
EXPORTING i_row_id = ls_modi-row_id
i_fieldname = ls_modi-fieldname
i_value = totalbill.
ENDLOOP.
ENDFORM. "data_changed
FORM caller_exit USING is_data TYPE slis_data_caller_exit.
* Switch to OO_ALV:
DATA: lr_alv TYPE REF TO cl_gui_alv_grid.
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
IMPORTING
e_grid = lr_alv.
* Register ENTER as edit event:
CALL METHOD lr_alv->register_edit_event
EXPORTING
i_event_id = cl_gui_alv_grid=>mc_evt_enter.
* pls. use MC_EVT_MODIFIED if leaving the cell should trigger the edit event!
ENDFORM. "CALLER_EXIT
*& Form TOP-OF-PAGE
* text
FORM top-of-page.
*ALV Header declarations
DATA: t_header TYPE slis_t_listheader,
wa_header TYPE slis_listheader,
t_line LIKE wa_header-info,
ld_lines TYPE i,
ld_linesc(10) TYPE c.
DATA: text TYPE sdydo_text_element,
a_right TYPE REF TO cl_dd_area.
DATA: tran TYPE string,
send TYPE string,
wbs TYPE string,
nwa TYPE string.
text = 'Create Hauling Charges for Project'.
wa_header-typ = 'S'.
wa_header-info = text.
APPEND wa_header TO t_header.
CLEAR: wa_header.
gw_header-line01 = text.
CONCATENATE 'Transaction Date: ' p_trand INTO tran SEPARATED BY space.
text = tran.
wa_header-typ = 'S'.
wa_header-info = text.
APPEND wa_header TO t_header.
CLEAR: wa_header.
gw_header-line01 = text.
CONCATENATE 'Sender Cost Center: ' p_cost INTO send SEPARATED BY space.
text = send.
wa_header-typ = 'S'.
wa_header-info = text.
APPEND wa_header TO t_header.
CLEAR: wa_header.
gw_header-line01 = text.
CONCATENATE 'Receiver WBS: ' p_wbs INTO wbs SEPARATED BY space.
text = wbs.
wa_header-typ = 'S'.
wa_header-info = text.
APPEND wa_header TO t_header.
CLEAR: wa_header.
gw_header-line01 = text.
CONCATENATE 'Receiver Network and NWA: ' p_nwa INTO nwa SEPARATED BY space.
text = nwa.
wa_header-typ = 'S'.
wa_header-info = text.
APPEND wa_header TO t_header.
CLEAR: wa_header.
gw_header-line01 = text.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = t_header.
ENDFORM. "top-of-page
FORM pf_set_top_page_heading USING typ
key
info.
ls_heading-typ = typ.
ls_heading-key = key.
ls_heading-info = info.
APPEND ls_heading TO t_heading.
ENDFORM. " PF_SET_TOP_PAGE_HEADING
*& Form PF_SET_TOP_PAGE_EVENTS
FORM pf_set_top_page_events USING name
form.
ls_events-name = name.
ls_events-form = form.
APPEND ls_events TO t_events.
CLEAR ls_events.
ENDFORM. " PF_SET_TOP_PAGE_EVENTS
*& Form REUSE_ALV_GET_VARIANT
FORM reuse_alv_get_variant
USING value(iv_repid) TYPE sy-repid
value(iv_handle) TYPE slis_handl
CHANGING iv_variant TYPE disvariant-variant.
DATA: lv_exit(1) TYPE c,
ls_variant TYPE disvariant. " Structure for Variant
MOVE: iv_variant TO ls_variant-variant,
iv_handle TO ls_variant-handle,
iv_repid TO ls_variant-report.
CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
EXPORTING
is_variant = ls_variant
i_save = 'A'
IMPORTING
e_exit = lv_exit
es_variant = ls_variant
EXCEPTIONS
not_found = 1
program_error = 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.
IF lv_exit = space.
MOVE ls_variant-variant TO iv_variant.
ENDIF.
ENDFORM. " REUSE_ALV_GET_VARIANT "
FORM user_command USING w_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
CASE w_ucomm.
WHEN '&DATA_SAVE'.
* READ TABLE it_data INTO wa_data." INDEX rs_selfield-tabindex.
DELETE it_data WHERE eqpno IS INITIAL.
LOOP AT it_data INTO wa_data.
CONDENSE wa_data-eqpno.
MOVE-CORRESPONDING wa_data TO wa_modified.
APPEND wa_modified TO it_modified.
ENDLOOP.
MODIFY zit_haul_line FROM TABLE it_modified.
ENDCASE.
ENDFORM. "user_command -
Problem with decimal point in Korea and Japan
Hi all,
I have one problem with decimal points.
I need to change in my out put cuurency values as per japan or korea standards.
Please help me is there any function module for this one.
program using alv grid display.
i use write statement but it is not working. Because
data: L_AMT type glpca-hsl,
G_AMT TYPE CHAR15.
CURR this value is 'JPY'.
WRITE L_AMT CURRENCY CURR TO G_AMT.
here i need to do
L_AMT = G_AMT. "" going to runtime error.
if i taken like
data: L_AMT TYPE CHAR15,
G_AMT TYPE CHAR15.
CURR this value is 'JPY'.
WRITE L_AMT CURRENCY CURR TO G_AMT. "" it is not working
Regards
marganiHello,
This is pretty basic, whenever you've currency & quantity fields you need to pass the corres. reference fields.
In your case you need to populate the cfieldname & ctabname fields of the FieldCat.
BR,
Suhas -
Hi all,
I want to write FMS Query on reference field of payment means window on change of vendor code while making outgoing payment. Is It possible ?
If i run the query in query generator it gives me the result. But by capturing system information it gives me NO DATA.
Thanking you
MalhaarHi Malhaar.........
Try this.......
SELECT S0.SERIESNAME + ltrim(str(P0.DOCNUM)) as PO
FROM OPOR P0 INNER JOIN POR1 P1 ON P0.DOCENTRY = P1.DOCENTRY
INNER JOIN NNM1 S0 ON P0.SERIES = S0.SERIES
INNER JOIN OCRD C0 ON P0.CARDCODE = C0.CARDCODE
LEFT JOIN OCTG T0 ON C0.GROUPNUM = T0.GROUPNUM
LEFT JOIN OSHP D0 ON P0.TrnspCode=D0.TrnspCode
WHERE (DateDiff(D,P0.DocDate,Getdate()) = 0 OR DateDiff(D,P0.U_ETD,Getdate()) = 0) AND T0.GroupNum = 21 AND P0.CARDCODE = $[OVPM.CardCode.0]
Hope this will help you.......
Regards,
Rahul -
Need a fms query on G/L account code for the AP Screen
Hi SAP B1 Experts,
Could somebody suggest a simple query I could run on the G/L account code field to select a particular account code when using a particular BP code.
So for example I would like the user to be able to choose just 2/3 accounts instead of the mass list you get based on the BP partner he is looking at.
Do I need to add a UDF field into the BP for the particular Account Code I want associated with him?
Any suggestions would be appreicated as I want to cut down the time on search the g/l code list as it is quite long
regards
PaulHi Rahul,
I think I follow the below overall however I have setup the UDT and created the UDF's BP CODE and ACCOUNT as you suggested.
How do you associate the BP Code with the Account Number in the Table?
So for my example:
I will setup a Supplier Code and two account codes with it.
BP Code: S1234 Account 1234567
S1234 Account 1234567
I have tried setting up default values but they don't appear to work. I must be doing something wrong as nothing appear when I query the table. Have I missed a step here?
Once the table is right I assume I then use the FMS Query below to look at the table based on my UDT vs the OPCH.Cardcode Field?
If I can get the table right I think I follow your example from there
thank you both for a quick response -
Production order Unit of Messure-decimal rounding issue
Finished product is a Metal conveyor belt.
Material Base UoM is Links u2018LKu2019
Alternative UoM are:
10 link = 1 Feet
1 meter = 3.2808 Feet
Plant X800, (MTO) Sales orders created in meters. So production orders in Meters (MM02->work scheduling view->Production unit & Unit of Issue maintained in Meters)
Now Issue is:
If production order is 10 meters, this is converted to 328.084 LK. Physically shopfloor receives only 328 LKs after production.
Links cannot be in decimals. Inventory and Costing is done u2018per Linku2019.
This needs a decimal rounding to u20180u2019 value. Expectation will be 328 LK.
If the value is 1.49 then the rounding value will be u20181u2019 (< 0.5)
If the value is 1.5 then the rounding value will be u20182u2019 (>0.5)
Please help me. Is there a config Setting or a work around (user exit)?Your requirement cannot be fulfilled by customization. Nor it can be perfectly implemented though BAdI's or Userexits.
The settings in CUNI only hide the decimal zeros but it won't prevent either users or programs to enter decimals. in R/3 quantity field uses the domain MENG13 so in your case, in the production order it will always display in decimals (eg 328.084 LK) .You can refer to note for more understanding about CUNI settings and IM postings 931971
Also the following threads:
UOM EA is taking data in decimals
The solution (this is more of workaround) I would suggest is you need to implement a BAdI WORKORDER_GOODSMVT in which it will round off according the logic you mentioned in your posts above. Also you need to implement a user exit for CO11N/CO11/15 to confirm the same yield according to the same rounding logic. Since yours is MTO you need to evaluate the impact of this in other areas mainly controlling and finance. -
Hi,
I want to FMS Query for Purchase Order.
I want to display the weight * price in one user define field.
Please suggest meHi Tushar.......
Try this.......
declare @var1_wt as varchar(255)
declare @var2_Pr as varchar(255)
declare @var3 as float
declare @var4 as float
set @var1_wt=$[$38.58.0]
set @var2_Pr=$[$38.14.0]
set @var3=cast( substring(replace(@var1_wt,',',''),0,len(replace(@var1_wt,',',''))-1) as float)
set @var4=cast(substring(replace(@var2_Pr,',',''),0,len(replace(@var2_Pr,',',''))-3) as float)
select @var3 * @var4
Regards,
Rahul -
Why is this FMS query not working for me?
There is already a FMS query that works in Delivery Pane. The FMS field there is a user defined field called U_NWR_Bin, rom table DLN1. This works fine and it is alpha numeric 10 characters. This FMS is defined in Marketing Documents rows.
I created another user defined field called U_Bin in table PKL1 for picklist row level. This user defined field shows up in FMS in PickList Pane.
I created a query - SELECT $[DLN1.U_NWR_Bin].
I then assigned above query through Shift F2 to Picklist Pane field U_Bin.
The above query is not executed on clicking the lens it gives the error - Internal error -1004 occured message 131-183.
What am I doing wrong? Please help. Thanks.Hi,
FMS query can only access the current form. $[DLN1.U_NWR_Bin\] is not valid for PickList Pane.
Thanks,
Gordon
Maybe you are looking for
-
Javascript void with all my browsers
i started using some java based sites and they worked fine but one day alot of the sites i used no longer would comply with whatever id click or some pages wouldnt load at all and i get a Javascript::void(0) message at the bottom of the screen. ive e
-
I can't remember the passcode for my iPod touch, what should I do?
I lost my access code of my IpodTouch, what should I do
-
iphone 6 automatically turn on even not connect to charger, why would this happen and how to solve it?
-
I have downloaded the code related to Byte Pair encoding. It is specific to C and C++ languages. I tried porting the code from c to Java, but i have faced problem with the length available in C & java for character. In java it takes 2 bytes but in C
-
Mac book pro wont show mac app store when updated
My daughter's macbook pro won't show the mac app store on her dock. She has updated it a numerous amount of times, and nothing has changed each time. She did everything the computer told her to (put her password in, restart it..). Can anyone tell me