How check characteristics values in material user exit
Hi Forum,
we want to check characteristics values if a new material is created. All the other check we do we use the User exit EXIT_SAPLMGMU_001 (abap ZXMG0U02). But it is not possible to check the values a user entered here. Do somebody of you have an idea?
Regards
Berthold
try to use:
BADI_MATERIAL_REF Addition of customer-defined default data for material
BADI_MATERIAL_CHECK Enhanced checks for material master table
WSTRN_STYLE BAdI to get the text for a char. value defined in check
BADI_MM_MATNR
pls. reward points if helpful
regards
Roberto
Similar Messages
-
How can i do a variable User exit that present the values before execute
Hi Gurus,
How can i do a variable User exit that present the values before execute, i need this:
a variable that calculate SYS-DATUM until 30 days before (I got the code) but this variable run automatic because is user exit, i want this variable but first present the values, not execute automatic, this is because the users want the report that automatic present the values , helpHi,
Refer the below links,
http://documentation.softwareag.com/natural/nat424mf/pdf/ops_mf/conf_usrex.pdf
http://www.erpgenie.com/component/content/article/1097
http://www.apentia-online.at/UP/Apentia/files/Article/SAP_BW_User_Exits_and_BAdIs.pdf
Hope it helps you,
Regards,
Ravindra. -
How to activate or deactivate a user-exit based a specific condition
hi all,
i want to activate or deactivate(make it trigger) a particular user-exit based in a condition.
can i do that. if yes please tell me how.
can we use COMMIT in user-exits or BADI's.
Thanks & Regards,
Saroja.Hello Saroja
The solution provided by Rich should be used for testing purposes only in the the reverted sense:
IF ( syst-uname ne '<specific user>' ).
RETURN.
ENDIF.
" Execute user-exit for specific user
However, for serious programming you should use a a better strategy. In principle, user-exits are either ON or OFF and, if they are ON, they are ON for <b>all </b>user which is usually not intended.
The following example shows a (possible) strategy how to execute user-exits based on specific conditions.
The SAP extension CATS0001 contains the component EXIT_SAPLCATS_001 with the following interface:
FUNCTION EXIT_SAPLCATS_001.
*"*"Lokale Schnittstelle:
*" IMPORTING
*" VALUE(SAP_TCATS) LIKE TCATS STRUCTURE TCATS
*" VALUE(SAP_PERNR) LIKE CATSFIELDS-PERNR
*" VALUE(SAP_DATELEFT) LIKE CATSFIELDS-DATELEFT
*" VALUE(SAP_DATERIGHT) LIKE CATSFIELDS-DATERIGHT
*" VALUE(SAP_DATEFROM) LIKE CATSFIELDS-DATEFROM OPTIONAL
*" VALUE(SAP_DATETO) LIKE CATSFIELDS-DATETO OPTIONAL
*" TABLES
*" SAP_ICATSW STRUCTURE CATSW
*" SAP_ICATSW_FIX STRUCTURE CATSW OPTIONAL
INCLUDE ZXCATU01.
ENDFUNCTION.
The include ZXCATU01 contains only the following coding:
CALL FUNCTION 'Z_EXIT_SAPLCATS_001'
EXPORTING
sap_tcats = sap_tcats
sap_pernr = sap_pernr
sap_dateleft = sap_dateleft
sap_dateright = sap_dateright
SAP_DATEFROM = SAP_DATEFROM
SAP_DATETO = SAP_DATETO
tables
sap_icatsw = sap_icatsw
SAP_ICATSW_FIX = SAP_ICATSW_FIX.
This function module is just a copy of the exit function module in the customer namespace.
Let us assume that your condition at which the user-exit should be executed is that the employee (SAP_PERNR) belongs to a specific controlling area. Thus, we make another copy of the original exit function module and call this fm within the "general" customer-specific exit function module:
FUNCTION z_exit_saplcats_001.
*"*"Local Interface:
*" IMPORTING
*" VALUE(SAP_TCATS) LIKE TCATS STRUCTURE TCATS
*" VALUE(SAP_PERNR) LIKE CATSFIELDS-PERNR
*" VALUE(SAP_DATELEFT) LIKE CATSFIELDS-DATELEFT
*" VALUE(SAP_DATERIGHT) LIKE CATSFIELDS-DATERIGHT
*" VALUE(SAP_DATEFROM) LIKE CATSFIELDS-DATEFROM OPTIONAL
*" VALUE(SAP_DATETO) LIKE CATSFIELDS-DATETO OPTIONAL
*" TABLES
*" SAP_ICATSW STRUCTURE CATSW
*" SAP_ICATSW_FIX STRUCTURE CATSW OPTIONAL
" User-Exit specific for employees (SAP_PERNR)
" belonging to controlling area 1000
CALL FUNCTION 'Z_EXIT_SAPLCATS_001_1000'
EXPORTING
sap_tcats = sap_tcats
sap_pernr = sap_pernr
sap_dateleft = sap_dateleft
sap_dateright = sap_dateright
sap_datefrom = sap_datefrom
sap_dateto = sap_dateto
TABLES
sap_icatsw = sap_icatsw
sap_icatsw_fix = sap_icatsw_fix.
" User-Exit specific for employees (SAP_PERNR)
" belonging to controlling area 2000
CALL FUNCTION 'Z_EXIT_SAPLCATS_001_2000'
EXPORTING
sap_tcats = sap_tcats
sap_pernr = sap_pernr
sap_dateleft = sap_dateleft
sap_dateright = sap_dateright
sap_datefrom = sap_datefrom
sap_dateto = sap_dateto
TABLES
sap_icatsw = sap_icatsw
sap_icatsw_fix = sap_icatsw_fix.
ENDFUNCTION.
Finally, within the specific exit function module we define the condition when the exit should be executed:
FUNCTION z_exit_saplcats_001_1000.
*"*"Local Interface:
*" IMPORTING
*" VALUE(SAP_TCATS) LIKE TCATS STRUCTURE TCATS
*" VALUE(SAP_PERNR) LIKE CATSFIELDS-PERNR
*" VALUE(SAP_DATELEFT) LIKE CATSFIELDS-DATELEFT
*" VALUE(SAP_DATERIGHT) LIKE CATSFIELDS-DATERIGHT
*" VALUE(SAP_DATEFROM) LIKE CATSFIELDS-DATEFROM OPTIONAL
*" VALUE(SAP_DATETO) LIKE CATSFIELDS-DATETO OPTIONAL
*" TABLES
*" SAP_ICATSW STRUCTURE CATSW
*" SAP_ICATSW_FIX STRUCTURE CATSW OPTIONAL
IF ( <user BELONGS to CONTROLLING area 1000> ).
" execute user-exit
ELSE.
RETURN.
ENDIF.
ENDFUNCTION.
The alternative would be to place the entire coding including the conditions in the include ZXCATU01. However, in this case you can test the user exit <b>only in the context of the transaction</b> in which the user-exit is passed.
Using the strategy I have devised you are able to test the user-exit in general and the specific user-exits <b>independent </b>of the transaction. For example, if you are already working on 6.40 or higher then you could use ABAP Unit Testing for this purpose.
The same logic can be applied for BAdI where we can have only a single active implementation.
Finally, I hope to convince that it makes sense to spend some time into a reasonable strategy for implementing user-exits.
Regards
Uwe -
How to select several values from a user exit variable in a planning folder
Hello,
I have created a user exit variable for limiting the values only to which the user need to access.
For a simulation part, it is then necessary for him to select several values from these values (not only one, and not all)
But It seems in this case the user has only two possibilities :
- keep all the values without any restriction
- restrain the selection to only one value.
It seems possible for the user to access to a multiple choice window, but this possibility doesn't seems to work : in all tests we did, only the first value was taken into account by BPS.
If this method is not good do you know an other manner to permit the user to choice several values amongst a set of pre-selected (because the original set is too important) values ?
Thanks for your help.Hi Mayank,
Thanks for your response, but I don't think it corresponds to my problem.
I my case, I use a user exit variable to filter some data. It seems BPS offers the possibility to the user to select several values amongts the pre-selected values presented by the user exit variable, but it doesn't work. We can use a popup in which we enters the required values, but in final, only the first value is taken into account.
I don't know if it is due to a BPS bug or if it is not a good solution in regard to BPS philosophy. In this case, the concerned caracteristic isn't in the header but in lead columns.
I must present a solution to my client next monday, so I have not enough time to open an OSS message.
An alternate solution should be interesting too.
My need is to present to a user a selection of values amongst all values from an infoobject (the user exit variable seemed to be a good solution) and the user must have the possibility to select some values amongst these as filter.
Regards -
How to trigger Availability check in Sales Order 'save' user exit.
I have requirements which dictate that I change item categories of most of the line items in a user exit. If I do that the line items no longer confirm. I know that the availability check happens in 'move_Field_to_vbap' user exit. Is there any way I can re-trigger it on save. These orders will be coming through a bapi. Thanks in advance.
Hi!
Search the way (via menu) in VA01 to trigger the availability check manually. Then have a look, with routines are called.
Then call this (these) routines in the exit. If you see something like 'perform okcode_...', then this should work. Be careful not to trigger recursive loops by this way. Maybe the prepare_save-exit is a better place to do this.
Regards,
Christian -
Manually trigger Availability Check in the Sales Order User Exit MV45AFZZ
Hi All,
As per the normal scenario where sales orders are created and the schedule line delivery dates are determined.
Based on some business logic for few customers we need to change the delivery priority and confirmation delivery date.
We are implementing this logic in the user exit MV45AFZZ in the routine USER_EXIT_SAVE_DOCUMENT_PREPARE.
The availability check logic is already implemented by then. Now we have scenarios where the date redetermined by the custom logic is greater than the one determined by the standard availability check done by SAP.
We have changed the values of the field VBEP-EDATU as per our logic but we still have 2 lines in the schedule line data where the requested date is greater than the confirmed date.
This can be tackled if we can redo the Availability Check.
Can someone provide pointers on how can we trigger the availability check manually in the code.
Regards,
KarthikWhat was the solution?
-
How to find out the 'z' user exit used in a Particular Transaction
Hi,
I have requirement to analyse all the user exits used in a transaction say 'VA01' . How can i find the user exits in a VA01 transaction. Can anyone suggest how to find the User exits
Thanks in Anticipation.
With Best Regards
mamathayou can execute the following program , give the transaction name and execute
*& Report YCHATEST *
REPORT z_find_userexit NO STANDARD PAGE HEADING.
*& Enter the transaction code that you want to search through in order
*& to find which Standard SAP User Exits exists.
*& Tables
TABLES : tstc, "SAP Transaction Codes
tadir, "Directory of Repository Objects
modsapt, "SAP Enhancements - Short Texts
modact, "Modifications
trdir, "System table TRDIR
tfdir, "Function Module
enlfdir, "Additional Attributes for Function Modules
tstct. "Transaction Code Texts
*& Variables
DATA : jtab LIKE tadir OCCURS 0 WITH HEADER LINE.
DATA : field1(30).
DATA : v_devclass LIKE tadir-devclass.
*& Selection Screen Parameters
SELECTION-SCREEN BEGIN OF BLOCK a01 WITH FRAME TITLE text-001.
SELECTION-SCREEN SKIP.
PARAMETERS : p_tcode LIKE tstc-tcode OBLIGATORY.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN END OF BLOCK a01.
*& Start of main program
START-OF-SELECTION.
* Validate Transaction Code
SELECT SINGLE * FROM tstc
WHERE tcode EQ p_tcode.
* Find Repository Objects for transaction code
IF sy-subrc EQ 0.
SELECT SINGLE * FROM tadir
WHERE pgmid = 'R3TR'
AND object = 'PROG'
AND obj_name = tstc-pgmna.
MOVE : tadir-devclass TO v_devclass.
IF sy-subrc NE 0.
SELECT SINGLE * FROM trdir
WHERE name = tstc-pgmna.
IF trdir-subc EQ 'F'.
SELECT SINGLE * FROM tfdir
WHERE pname = tstc-pgmna.
SELECT SINGLE * FROM enlfdir
WHERE funcname = tfdir-funcname.
SELECT SINGLE * FROM tadir
WHERE pgmid = 'R3TR'
AND object = 'FUGR'
AND obj_name = enlfdir-area.
MOVE : tadir-devclass TO v_devclass.
ENDIF.
ENDIF.
* Find SAP Modifactions
SELECT * FROM tadir
INTO TABLE jtab
WHERE pgmid = 'R3TR'
AND object = 'SMOD'
AND devclass = v_devclass.
SELECT SINGLE * FROM tstct
WHERE sprsl EQ sy-langu
AND tcode EQ p_tcode.
FORMAT COLOR COL_POSITIVE INTENSIFIED OFF.
WRITE:/(19) 'Transaction Code - ',
20(20) p_tcode,
45(50) tstct-ttext.
SKIP.
IF NOT jtab[] IS INITIAL.
WRITE:/(95) sy-uline.
FORMAT COLOR COL_HEADING INTENSIFIED ON.
WRITE:/1 sy-vline,
2 'Exit Name',
21 sy-vline ,
22 'Description',
95 sy-vline.
WRITE:/(95) sy-uline.
LOOP AT jtab.
SELECT SINGLE * FROM modsapt
WHERE sprsl = sy-langu AND
name = jtab-obj_name.
FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
WRITE:/1 sy-vline,
2 jtab-obj_name HOTSPOT ON,
21 sy-vline ,
22 modsapt-modtext,
95 sy-vline.
ENDLOOP.
WRITE:/(95) sy-uline.
DESCRIBE TABLE jtab.
SKIP.
FORMAT COLOR COL_TOTAL INTENSIFIED ON.
WRITE:/ 'No of Exits:' , sy-tfill.
ELSE.
FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
WRITE:/(95) 'No User Exit exists'.
ENDIF.
ELSE.
FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
WRITE:/(95) 'Transaction Code Does Not Exist'.
ENDIF.
* Take the user to SMOD for the Exit that was selected.
AT LINE-SELECTION.
GET CURSOR FIELD field1.
CHECK field1(4) EQ 'JTAB'.
SET PARAMETER ID 'MON' FIELD sy-lisel+1(10).
CALL TRANSACTION 'SMOD' AND SKIP FIRST SCREEN. -
Transfer of characteristics values from material variant to its subordinate
Gurus
Need your Expert opinion on Variant configuration
We are using Multi level Material Variants and our bussiness process demands for configuration of These Material variants in Transaction MD81 and during creation of Sales order .These configuration will not affetc the BOM explosion but will only be passed to the The lower level components (Which are again theMulti level Configuriable Material variants ) as manufacturing instructions .To Enable these Flow of Characterisitcs we have Applied a Note which allows the Multi level Configuration of Material Variants and Pass this Values to lower Level and the characteristics value flow is visible as well for lower level from CU50 ,but when i create the requirement through CIR or sales order and Configure the Material Variants and Generate the Procurement Proposals to fullfill these requirements (MD02) in the form of Planned order we are unable to pass one the Characterisitcs values to planned orders of lower level Components of Material Variants .These characterisitc values are Used as Manufacturing Instructions and should be passed on to the Lower level of Material Variants through the use of dependencies in Configuration profile .but the problem is it works in CU50 and does not flow in planned orders , does any body have a solution for this ?
Thanks In Advance
awaiting reply
MilindHi Milind,
I check that you implement a Note which allows the Multi level Configuration of Material Variants? is it sap note? mind to share the number.
I ever faced this problems to before but fortunately the case in simpler so i just create another variant and maintain the component for the variant. For example : characteristic color. I create variant with color red black etc. For variant red, maintain component red. For variant black maintain component black, so on. Is it possible for your case?
Regards,
Arman -
Picking or copying Characteristics Value from material master
Dear Experts,
Please i create five Characteristics which i assign to a Class ( of type 022 ). The Class is then assigned to materials in the classification View of the Material Master.
I want one of the five Characteristics to copy its values from specific parameter value maintaned in the Material Master.
Please assist on how to accomplish this?
I did the following but did not get the desired results; While creating this Characteristic, in the Values Tab, I filled ''MARC'' in the Tablename field & in the Fieldname field, i enter the technical fieldname of the particular field from table MARC which i want.
I want this particular value to be automatically copied into the Characteristics Value field in the Foreground for eacb batch anytime Goods Receipt is done.
after doing this, anytime Goods Receipt is done & a batch number generated, it takes me to the Classification screen, but this particular field which i desire to be auto updated remains blank.
Please assist ?Hi,
1. This will not automatically updated just as we wil fill the addtional date table and field.
2. you need to write the object dependency to get it updated when you call somewhere
3. Generally in the batch level you will be able to do this .( even you can use function / object dependency )
Reg
Dsk -
Characteristics values for material and plant
Hi Experts,
I need to fetch characterstic values from a class Y-xx . I belive badi BAPI_CLASS_GET_characteristics
will give the result but my problem is in selection screen I am passing material no and plant
for this material and plant i need to fetch the characteristics values from the Y_xx class
Could any one suggest the BADI or FM or tables to fetch the results
Thanks in advanceHi,
Go to MEK2, here enter the freight condition type, go to the output screen as pr the access maintained and select the line item and click on "Scales" button to see the from and to value.
Also you can check the same in "Conditions" button in Purchase Info record. -
FM to check Characteristics values assignment
Hi , Experts:
Can tell me which FM should I use to check if a Characteristics value has been assigned to a material?
Thanks for your help
SanweiI believe that there is no such FM. You need to build a range for your constant values and then compare your select option with the range build for constants.
Eg.
select-options: s_werks for t001w-werks.
ranges r_werks for t001-werks.
r_werks-sign = 'I'.
r_werks-option = 'EQ'.
r_werks-low = '2101'. "Pass the constant value.
append r_werks. "Range built for one entry 2101. Similarly append further constant values.
*Check if select option contains any of the constant values.
if s_werks in r_werks.
* Select-options contains value as defined in range
else.
* No matching value found.
endif. -
How to call custom screen from User exit?
Hai,
I have to call a custom screen from user exit include after the delivery save.
Depends on the data in the delivery,
if the data satisfies certain conditions I will call the screen otherwise no.
Could any one please tell me how to do this?where to create screen & how to link it here?
Regards,
Bhaskar.Hi,
Please check with the following Enhancements -
V50PSTAT - Delivery: Item Status Calculation
V50Q0001 - Delivery Monitor: User Exits for Filling Display Fields
Rewards if it helps
Regard
Goutham -
How to pass parameter in Validation User Exit
Hi All,
We need to create a Validation to match USER ID with PERSON RESPONSIBLE (that is maintained in Funds Center master record). This is required to ensure that only person responsible can release budget.
How can I pass "Funds Center" as a parameter to the User Exit so that I can run database query to find person responsibel of that Funds Center.
Regards,
HanifHi Alex,
I belive i could not explain the problem properly... let me write it again.
1. I maintained Validation using FMVABD.
2. In PREREQUISITE I checked budget release operation using BPJA_VALID-VORGA = 'KBFR'
3. In CONDITION I used a user exit U100.
4. Made a copy of RGGBR000 as ZRGGBR000 and assigned it using GCX2.
5. Added following ABAP Code in FORM U100.
<CODE>
b_result = B_FALSE.
SELECT SINGLE * FROM FMFCTR WHERE BOSSID = SY-UNAME AND FICTR = '??????'.
IF SY-SUBRC = 0.
b_result = B_TRUE.
ENDIF.
</CODE>
'??????' In the second condition of WHERE CLUASE I want to mention Fund Center for which Budget is being released.
Another point is while maintaining validation using FMVABD, under TABLE FIELDS tab, one can find BPJA_VALID-FISTL (means Funds Center) but but I can not use in my ABAP Code.... it gives error message "BPJA_VALID" is unknown.
My appolgies for lengthy explanation... but hope it will help understanding the issue.
Regards,
Hanif -
How to find which are the user exits that updating z table.
There was a question posted by someone else which said:
I have a z table. my requirement is to find the user exits that update the value to this table?
but my requirement is to get only those user exits that update my z table.
Before that question was rejected, it got 5 replies which made me think that this tip is worth sharing.
So the steps are:
Do a where-used list search from SE11
Click on Search Range button at bottom
Type UPDATE (you can also add Insert, Delete etc to select-option) to ABAP Key Words field
Say No to the popup that asks whether to include Fields of the Table
Result will show relevant programs with code snippets doing static Update on that custom table.EWK1 would be too performance heavy in this case. It scans the source code to get the result.
You can however, download the list of programs given in where-used list, and give that as limiting condition in EWK1 or some other code scanning utility.
Using my method, where-used list of table is taken from database tables, and then code scanning is done only on the that list, not on entire Z* programs.
Try it yourself to notice the speed difference. -
Copy of Batch characteristics value from material master to Batch
Hi Gurus,
I have maintained some values in the characteristics under batch classification in material master and want to copy the values in batch characteristics during batch creation at process order release.
Can any one help me to achieve this in standard way?
Thanks
SandipHi,
Try to understand the batch classification functionality...In batch classification characteristic values changes from batch to batch...Values should not be maintained in the material master...it does not have any meaning...in the material master we need to assign only the batch class with class type 023 in classification view ...no need to assign the values there....Batch classification means characteristics values differs from batch to batch...
Thanks
Kumar
Maybe you are looking for
-
What is the part number for the fan for the dv7 2270 us
what is the part number for the fan for the dv7 2270 us
-
How do I lock clips to timeline?
Hey everybody. I am a new 4 user and am not used to the way that it 'thinks' so much and am not enjoying the self adjusting that it does to your timeline when you make any adjustments to clips or pictures earlier in the time line. Ex1: Want to swap o
-
To play video stream by using MHP
Hi I want to play a video from the MHP application. Could anybody help me of that. Thanks, Ranikkarasu
-
Rv082 get down about 2-3 times in a week
Hello, i have 1 head office ( rv082 ) and about 14 branches (13 rv042 and 1 rv082 ) which are connected by VPN Tunnels. About 2 weeks ago my primary RV082 starts FAILs about 2-3 times in a week, but in local network i can connect to it. Tell me pleas
-
How to have all columns display in one go in RSA3
i'm trying to extract the sales order item (2LIS_11_VAITM) thru RSA3 into flat file. However, the maximum number of columns is limited to 90 columns ( with a hundreds of hidden fields by default). I don't see the system provide you the user parameter