Reading a scale value for a condition
I have a condition on VK12 with a scale value on it. It's a perception minimum for a tax.
I have a SD formula (937) on VOFM - Formulas - Condition Value. There in some cases I want to check if a sum stored in gkmov is greater than this perception minimum or not.
Anybody knows a function or a way to read this minimum?
Thanks!
Finally I realized that KONW was with old data sometimes, so it wasn't usefull. But on these formulas XKOMV has the field KNUMH with the proper value charged for each line, so with this code I read the KONW table by myself and I solved the problem.
Similar Messages
-
Function module to change the value for pricing condition type
Hello experts,
I want to change the value for pricing condition type for an item in the transaction CRMD_ORDER.
I used many function modules but none are working.
Please kindly suggest a function module that will change the value for a condition type .
I have used the following function module but its not working, please correct the coding if anything needs to be changed or added. Please help me .
Thank you.
CLEAR PRCD_COND.
SELECT SINGLE * FROM PRCD_COND WHERE KPOSN = WA_ORDERADM_I-GUID AND
KSCHL = COND_TY.
IF SY-SUBRC = 0.
* MOVE-CORRESPONDING PRCD_COND TO L_COND_CHG.
* CLEAR L_COND_CHG-KBETR.
L_COND_CHG-STUNR = PRCD_COND-STUNR.
L_COND_CHG-KBETR = COND_PRC.
* L_COND_CHG-KSCHL = COND_TY.
INSERT L_COND_CHG INTO TABLE T_COND_CHG.
L_HEAD_GUID = CRMD_ORDERADM_H-GUID.
L_ITEM_GUID = WA_ORDERADM_I-GUID.
INSERT L_HEAD_GUID INTO TABLE HEAD_GUID.
INSERT L_ITEM_GUID INTO TABLE ITEM_GUID.
CALL FUNCTION 'CRM_ORDER_READ'
EXPORTING
IT_HEADER_GUID = HEAD_GUID
IT_ITEM_GUID = ITEM_GUID
IMPORTING
ET_ORDERADM_H = LT_ORDERADM_H
ET_ORDERADM_I = LT_ORDERADM_I
ET_PRIDOC = IT_PRIDOC_RD
ET_DOC_FLOW = T_DOC_FLOW
* CHANGING
* CV_LOG_HANDLE =
* EXCEPTIONS
* DOCUMENT_NOT_FOUND = 1
* ERROR_OCCURRED = 2
* DOCUMENT_LOCKED = 3
* NO_CHANGE_AUTHORITY = 4
* NO_DISPLAY_AUTHORITY = 5
* NO_CHANGE_ALLOWED = 6
* OTHERS = 7
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
MOVE-CORRESPONDING LS_PRIDOC_RD TO L_PRI_COND.
INSERT L_PRI_COND INTO TABLE PRI_COND.
LOOP AT IT_PRIDOC_RD INTO LS_PRIDOC_RD.
MOVE-CORRESPONDING LS_PRIDOC_RD TO L_PRIDOC_CHG.
L_PRIDOC_CHG-PRIC_COND = PRI_COND.
L_PRIDOC_CHG-REF_GUID = LS_PRIDOC_RD-GUID.
L_PRIDOC_CHG-COND_CHANGE = T_COND_CHG.
INSERT L_PRIDOC_CHG INTO TABLE PRIDOC_CHG.
ENDLOOP.
LOOP AT LT_ORDERADM_H INTO LS_ORDERADM_H .
MOVE-CORRESPONDING LS_ORDERADM_H TO L_HEADER.
INSERT L_HEADER INTO TABLE HEADER.
ENDLOOP.
LOOP AT LT_ORDERADM_I INTO LS_ORDERADM_I.
MOVE-CORRESPONDING LS_ORDERADM_I TO L_ITEM.
INSERT L_ITEM INTO TABLE ITEM.
ENDLOOP.
L_FIELD-FIELDNAME = 'STUNR'.
INSERT L_FIELD INTO TABLE FIELD.
L_FIELD-FIELDNAME = 'KBETR'.
L_FIELD-CHANGEABLE = 'X'.
INSERT L_FIELD INTO TABLE FIELD.
L_INPUT-FIELD_NAMES = FIELD.
L_INPUT-REF_KIND = 'E'.
L_INPUT-REF_GUID = LS_PRIDOC_RD-GUID.
L_INPUT-OBJECTNAME = 'PRIDOC'.
INSERT L_INPUT INTO TABLE INPUT.
CALL FUNCTION 'CRM_ORDER_MAINTAIN'
EXPORTING
IT_PRIDOC = PRIDOC_CHG
IMPORTING
ET_EXCEPTION = EXCEPT
CHANGING
CT_INPUT_FIELDS = INPUT.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
REFRESH EXCEPT.
CALL FUNCTION 'CRM_ORDER_SAVE'
EXPORTING
IT_OBJECTS_TO_SAVE = HEAD_GUID
* IV_UPDATE_TASK_LOCAL = FALSE
* IV_SAVE_FRAME_LOG = FALSE
* IV_NO_BDOC_SEND = FALSE
* IT_ACTIVE_SWITCH =
IMPORTING
ET_SAVED_OBJECTS = SAVED
ET_EXCEPTION = EXCEPT
ET_OBJECTS_NOT_SAVED = UNSAVED
* CHANGING
* CV_LOG_HANDLE =
* EXCEPTIONS
* DOCUMENT_NOT_SAVED = 1
* OTHERS = 2
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
COMMIT WORK AND WAIT.Hi,,
To be able to call a function module in an update work process, you must flag it in the Function Builder. When you create the function module, set the Process Type attribute to Update with immediate start
Alternatively u can use this function module.
CRM_STATUS_DATA_SAVE_DB
BAPI_CUSTOMERCRM_CHANGE (If u wish to use a bapi for this).
Also , Let me know what error you got when implementing other function module.Does the function module didnt return any error but still the value is not changed for pricing condition type? -
Hide values for certain condition types in Quotation Saleorder and Invoice
Hi All,
I have written code to hide values for certain condition types in LV69AFZZ,
this works fine in the ITEM LEVEL.
But for the same condition types, I could not hide the values in the HEADER LEVEL.
Unless I hide it at header level also, this is useless.
Please guide me how to do it.
Thanks & Regards
PradeepHi,
We have been using FORM USEREXIT_FIELD_MODIFICATION of LV69AFZz for item level & FORM USEREXIT_FIELD_MODIFIC_KOPF of LV69AFZZ for hiding heade level conditions.
I hope this helps,
Regards
Raju chiutale. -
Hello all,
I want to create or update multidimensional freight conditions for different scale id for different conditions.
I cound not find any Bapi or FM for this. I uesd BDC for this but i can not rely on it.
If any one have other solution than IDOC then suggest me.
Any BAPI or FM available then suggest me.Hi Gowri Rao,
Can you please tell me, what values do you pass in table 'IT_PRICING_CONDITIONS'?
Regards,
Pratik -
Multiple Values For one Condition in Choose From List
I have used one Business Partner Choose From List in my form but i want to give condition in that choose from list on GroupCode .But the condition will have multiple values like 100,102,104 then how i will write the code to incorporate multiple values for one single condition.
Hi,
Check this thread
How to set a Multiple condition in a single CFL
Hope that helps,
Vasu Natari. -
Changing Customer Reserve values for KNTYP (Condition Category)
Hi,
Thanks for clicking this post.
The plan is to change one of the Condition Categories to suit our organizations complex requirements.
The Domain is "KNTYP" and this has a predefined Fixed Value range. This range contains some values that SAP terms as "Customer reserve", e.g., 5 thru 9, and X thru Z. The intention is to tweak one of these values to suit our requirements.
Where do we change this? Is there a program, user exit, or its like where a little bit of code can be added so the system knows what to do when we use one of these values later in Condition Types?
Any pointers will be very useful. Please note that we are already aware of the negative consequences of such changes - we just need to know where to change.
Thanks in advance.
Venkat.Please check program RV61AFZA FORM USEREXIT_PRICING_RULE.
Sample code
if komk-konda = 'ZZ'.
steu-kntyp = 'GRLIE.....'.
steu-koaid = 'CDEGQ.....'.
steu-maueb = 'X'.
else.
steu-kntyp = 'GRLIEX5...'.
steu-koaid = 'CDEGQ.....'.
steu-maueb = 'X'.
endif.
append steu. -
Error while reading UcdContext [trying to read / set application values for users]
Hi,
I am trying to write a program to store user selected values on NW7.3 Portal using "User Content Directory". I can see and read some code snippets on how to set and read the context but I am getting one error after another.
The error message I am getting is
"com.sapportals.portal.pcd.gl.PcdGlContext:service:[email protected]entClassLoader@84507ed@alive incompatible with interface com.sapportals.portal.pcd.gl.IPcdContext:sap.com/[email protected]der@f46d103@alive ". Code snippet is as given below at the end of the message.
1) I tried different ways to have a lookup and always gave message as "look up not found" and for pcd:portal_content came up with above error.
2) Once I read the UCD context, I would like to store some values based on user selection and store them. User may change the values whenever they like and I will be using the values for other purposes in another application.
3) Has any one successful in setting and reading UCD Context in NW 7.3. Will it be possible to share such sample code as the code snippets at http://help.sap.com/saphelp_nw73ehp1/helpdata/en/4a/8e1bce28e24dd8abd9f4de05e5587d/content.htm are not much of use unless I am able to read the UCD.
Thanks for your help!
Regards,
Raju
TestingUCD is my test application and the following is code snippet
InitialContext initialContext = null;
IPcdContext pcdCtx;
Hashtable env = new Hashtable();
env.put(UCD_INITIAL_CONTEXT_FACTORY, UCD_INITIAL_CONTEXT_FACTORY);
env.put(Context.SECURITY_PRINCIPAL, request.getUser());
env.put(Constants.REQUESTED_ASPECT, IPcdAttribute.PERSISTENCY_ASPECT);
try{
initialContext = new InitialContext(env);
//response.write("Before pcdCtx lookup");
try {
pcdCtx = (com.sapportals.portal.pcd.gl.PcdGlContext) initialContext.lookup("pcd:portal_content");
} catch(Exception e){
response.write("Some problem with lookup" + e.getMessage());Hi,
There are quite few differences in the standard code snippet given by SAP Help on UCD and the once that you put above in the question.
Below is standard snippet.
Hashtable<Object, Object> env = new Hashtable<Object, Object>();
env.put(Context.INITIAL_CONTEXT_FACTORY,
IPcdContext.UCD_INITIAL_CONTEXT_FACTORY);
env.put(Context.SECURITY_PRINCIPAL, user);
InitialContext ctx = new InitialContext(env);
pcdCtx = (IPcdContext) ctx.lookup("");
============================
Check the ones highlighted in BOLD and compare them in your code. In your code when ur doing initial lookup you are not using the Correct class type cast for the returned lookup object!
Your code shows as below:
pcdCtx = (com.sapportals.portal.pcd.gl.PcdGlContext) initialContext.lookup("pcd:portal_content");
But may be it shd have been something like below:
pcdCtx = (IPcdContext) initialContext.lookup("pcd:portal_content");
Pls verify and hopefully this resolves your issues around look up.
Thanks,
Swapna Priya. -
Can not input data when removed the value for seleciton condition
Dear Experts,
We met a very strange issue for the IP.
We create a aggregation level and relatd query for user to key in data.
We have a filter in the aggregation level.
It will set value for A,B,C,D
When user opent he report, system will require user to key in the value for A,B,C,D.
Now we found that if we key in value for B, cell is input ready.
If we removed the value in for the B in the selection condition (I mean the value of B is empty, this means tha all the value of B will display in the report), we can not key in data.
Could you kindly let me kow the reason?
Thanks and best regards
Alex yangDear Experts,
Many thanks for your information.
I know the principle for the IP.
But I think you may misunderstanding this issue due to my incorrect explaination.
First, we think the aggreagtion level is ok. This is due to that for the B in my example, we set its as column value in the query.
This is means for each record in the IP query, it has only one B value to reflect it.
But strange things is that if we set fixed value for B, IP input is ok.
If we removed fixed value for B, IP function is error.
Now, we will test if we key in multi value for B whether IP input function is ok or not.
Any update, I will inform you.
Thanks and best regards
Alex yang -
Exclusion item condition value for header condition
Dear All,
I explained my problem with example scenerio.
Sales Order Total Net Amount = 1.500 EUR
SO Item-10 = Advance Payment Sales = 500 EUR >> for first invoice
SO Item-20 = Sales from stock with HAWA material - 1 = 300 EUR >> for second invoice
SO Item-30 = Sales from stock with HAWA material - 2 = 1.200 EUR >> for second invoice
SO Header condition > ZAP1 = Advance payment decrease = - 500 EUR
System divided Advance Payment amount to all items.
Item-10 = - 125 EUR
Item-20 = - 75 EUR
Item-30 = -300 EUR
My request is on below;
Item-10 = 0 EUR
Item-20 = - 100 EUR
Item-30 = - 400 EUR
Is calculation possible with zero value for item-10 ?
Thanks for your helps.
Gulay CelikHi Gulay
System cant divide the advance payment to all items ,System can divide the advance payment for one item .
But assign a billing plan at header level and just check , if it works then your requirement can be fulfilled.But generally it is done at item level only
Make the following down payment configurations
item category group - 0005
item category - TAO
for this TAO item category a billing plan 01 (milestone billing plan -01) will be assigned and its billing relevance should be I which is order related billing .
billing doc type - FAZ
cancellation billing doc type - FAS
maintain a condition type AZWR which is down payment settlement , it has requirement as 2 and calc type as 48 acct key as ERL
Now when you enter a material in line item 10 and go to item data , you can see the billing plan tab.
now go to billing plan tab and enter the start date and enter the dates on which billing has to be done and then in billing request enter 0009 which is for down payment.once u press enter automatically it all the dates get blocked and billing request by default you get as 1 , that you change it to 4 or 5 . 4 is for down payment at value basis and 5 is for down payment at percentage basis. and beside that there will be a billing type .assign billing doc type as FAZ. to all dates
check the copying requirements are there at VTFA as 20 and for item category TAO copying requirements 23 is maintained or not
now do the cycle OR - LF - FAZ (billing doc type)
Regards
Srinath -
To search for Who(USER) who maintained value for a Condition Type(Pr00)
Hi Team,
Do we have a table where in i can search for the Userwho maintained Pricing record for base value of a material..
I have the Material and i want to check who created this Condition Base Value Record ..And ask him to maintain it correctly again..
Thanks n hope an early response.
SumanDear Suman,
Please go to VK13 transaction enter your condition type then go to menu Environment ->Changes --> Click on Changes Report now system will take you to the Change documents for conditions screen here you give the selection data the execute system will give the output regarding changes details with the User details.
I hope it will help you,
Regards,
Murali. -
Wrong Condition base value for Z Condition
I have activated smartform Y640_SDORC_A and everything has the right value except for a Z condition based on weight.
If for example the weight is 30 kilos it shows 300 kilos.
Althought it has the wrong base quantity everything else gets copied ok, and the total its correct.
Does anyone know where should I check why is taking the value 10 times?
Thanks
Regards,
CarlosHi Carlos,
this program is probably working with fixed decimals (attributes of program) -> all amount fields have two decimals. KG is defined with 3 decimals (per customizing, might be changed) -> conversion is done by write, when the currency-option is used. If you calculate values, you have to take care of the decimal-shifting yourself.
Best regards, Christian -
How to read the default value for a Registry Key
I am trying to use webutil 1.0.2 Client_win_api_environment.read_registry to read the client registry key HKEY_CLASSES_ROOT\.xls, but the function is raising no_data_found. I can read the registry key in Regedit. I am logged on as myself as a non-admin NT user.
P.S: The Client_win_api_environment.read_registry can actually read HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\FORMS90_PATH because FORMS90_PATH is a registry ENTRY, whereas .xls in HKEY_CLASSES_ROOT\.xls is a KEY, but I still need the DEFAULT value of the key and it does NOT seem to work with client_win_api_environment.read_registry
My platform: Windows NT 4, Developer 9i 9.0.2.12.2, Oracle database 9.2.0.4.0, Oracle 9iDS
Webutil.log
===========
192.168.0.99:Lewis: 2003-Dec-17 16:36:44.998 WUL[getProperty()] Getting property WUL_ADD_PARAMETER
192.168.0.99:Lewis: 2003-Dec-17 16:36:45.08 WUL[getProperty()] Value of WUL_ADD_PARAMETER=3
192.168.0.99:Lewis: 2003-Dec-17 16:36:45.08 WUL[setProperty()] Setting property WUL_PARAM_PROPERTIES to B|14|33|50|0|2000
192.168.0.99:Lewis: 2003-Dec-17 16:36:45.28 WUL[getProperty()] Getting property WUL_ADD_PARAMETER
192.168.0.99:Lewis: 2003-Dec-17 16:36:45.28 WUL[getProperty()] Value of WUL_ADD_PARAMETER=4
192.168.0.99:Lewis: 2003-Dec-17 16:36:45.38 WUL[setProperty()] Setting property WUL_PARAM_PROPERTIES to B|14|33|50|0|0
192.168.0.99:Lewis: 2003-Dec-17 16:36:45.48 WUL[getProperty()] Getting property WUL_ADD_PARAMETER
192.168.0.99:Lewis: 2003-Dec-17 16:36:45.48 WUL[getProperty()] Value of WUL_ADD_PARAMETER=5
192.168.0.99:Lewis: 2003-Dec-17 16:36:45.58 WUL[setProperty()] Setting property WUL_INVOKE_SPEC to 1|14|33
192.168.0.99:Lewis: 2003-Dec-17 16:36:45.68 WUL[getProperty()] Getting property WUL_INVOKE
192.168.0.99:Lewis: 2003-Dec-17 16:36:45.68 WUL[getProperty()] Value of WUL_INVOKE=-1
192.168.0.99:Lewis: 2003-Dec-17 16:36:45.78 WUL[setProperty()] Setting property WUL_PARAM_PROPERTIES to F|14|3
192.168.0.99:Lewis: 2003-Dec-17 16:36:45.88 WUL[getProperty()] Getting property WUL_PARAM_VALUE
192.168.0.99:Lewis: 2003-Dec-17 16:36:45.88 WUL[getProperty()] Value of WUL_PARAM_VALUE=
192.168.0.99:Lewis: 2003-Dec-17 16:36:45.98 WUL[setProperty()] Setting property WUL_DESTROY_PARAMLIST to 14
192.168.0.99:Lewis: 2003-Dec-17 16:36:45.98 WUL[VBeanCommon.eraseFromObjectCache()] Removed cache reference to Object 14
Lewis Choo Man
CMIC,
Canada.Hi Manohar,
You have to give Distribution Key "1" in the Plannner Profile as well as if you take a column for Distribution Key seperately in your Planning Layout for Cost Element Planning, in the Excel file, you can give Distribution Key as "1" in the respective column. When you upload the data through Excel, the system will take the DKey as "1" only.
I hope it will solve your problem. Pls revert back for further assistance..
Srikanth Munnaluri -
Default value for pricing condition
Hi,
I have a requirement for a manual pricing condition for Minimum Order charge - ZMIN - to be automatically populated with a fixed value of £6 when entered manually onto an order.
Please advise if this is possible.
Thanks in advance.
MikeThanks for that SAP2020.
Where would I put the default value of £6? When I go into the order, I'd want the user to key in the pricing condition of ZMIN and then the condition value to be automatically populate with £6 automatically rather than having the user key the value manually.
I don't want to use condition records/access sequences to define the £6 as the minimum order charge is at the discretion of the person taking the order.
Thanks again,
Mike -
How to set value for skip condition in train stop property of train compnt
Hi,
Iam using JDev 11.1.1.5 version, i have created a TaskFlow where having train components pointing to different jsff pages, moving from one jsff page to another jsff page.
I want to validate the input fileds in one of the jsff page, then only have to move to next jsff page. For this, how can i set skip property of train component....to disable to go for next train component...?
Note: I want to set boolean value(returns 'True', if all input fileds are filled, otherwise 'False') into skip property of train component.
Regards.You can use the skip property of the train stop. You can have an EL expression for it, some thing like this #{pageFlowScope.isContinueEnabled}.
Once all the mandatory fields are entered, you can set the isContinueEnabled flag and refresh the train button bar.
For more info refer this: http://docs.oracle.com/cd/E14571_01/web.1111/b31974/taskflows_complex.htm#CJHFBFIE
Also, you can try navigating to different train stops programmatically.
Check: 082. How-to programmatically navigate ADF train models
in http://www.oracle.com/technetwork/developer-tools/adf/learnmore/index-101235.html -
Scale type D for group conditions
Hi all,
I am creating a new group condition and am trying to make it scale type D - graduated-to-interval scale. However because this is a group condition, SAP is giving me an error (Scale type 'D' cannot be used for group condition 'X').
What is the best solution to this?
I would like to give discounts based on:
Sales quantity:
1-100 = 15% off
101-200 = 25%
201-300 = 35%
301-400 = 45%Hello
This is b'coz your condition type with active Group condition Indicator. That means, here the system calculates the basis for the scale value from more than one item in the document.
So, the scale D maintain in Scale basis for those condition type, does not go with it and throws an Error.
Thus, if you want to scale functionality for condition type with group condition indicators use GrpCond.routine to maintain routine.
Routine number for creating group key identifies a routine that calculates the basis for the scale value when a group condition occurs in pricing.
For instance.
Check routine 3-Mat.Pricing Group. This is an example of a structure of group key formula. A structure of group key formula can be used to influence the basis the system uses when reading the scale of a group condition. The formula is assigned to a group condition type in customizing.
Formula '3' adds up the quantities / values of all of the line items in the sales document that have the same material pricing group (field KONDM) as the current sales document line item.
A company defines a particular discount (condition type Z001) with scales based on weight. When a sales order line item is priced that is eligible for the Z001 discount, the user would like the system to read the scale with not just the weight of the current line item, but the combined weight of all items in the sales document that have the same material pricing group as the current line item. To accomplish this, the user defines condition type Z001 as a group condition and assigns structure of group key formula '3' to it in customizing.
I hope this assist you.
Thanks & Regards
JP
Maybe you are looking for
-
Photoshop/Bridge CS4 problem with AFP shares
Hello, I have recently purchased Photoshop CS4 and encountered the following problem: when opening images from a NAS share connected via AFP using File/Open command, Photoshop will correctly display the list of files but Open command in the File open
-
Change name on saving rwservlet
hi, i have oracle 10g reports, when i am trying to call a report with delimited option with mimetype=application/vnd.ms-excel and saving on popup then default report name which is being offer to save is rwservlet, is there any option to change this d
-
Trying to recover an standby database
- Oracle 10.2.0.4 Standard Edition - O/S: Windows Server 2003 - Phisically Standby We have primary and a standby database. My standby database was synchronized through copying archive redo logs from Primary to Standby. They were copied every 15 min t
-
Yellow warning signs on iMovie clips?!
Hi! I have some home movies on iMovie with yellow triangular signs with a ! in the middle, all my clips have them. In school I made a commerial and I also have an extra clip with bloopers, those two will play (audio and all) with the yellow signs but
-
hi all i have uninstalled 10g xe but there still some oracle files in the folder : C:\Windows\winsxs plz how can i remove them, because it shwos : "you need autorization from TrustedInstaller..." thanks