2008 Jan 17 5:52 AM
Hi
Create contract with VA41, contract type WK1.
enter Target Value and Assortiment Module.
system demands me to enter Material
Is it possible to enter only Target Value and Assortiment Module, and then Material is chosen automaticaly (any technical number).
Thanks in Advance,
Ruslan.
Hi
Create contract with VA41, contract type WK1.
enter Target Value and Assortiment Module.
system demands me to enter Material
Is it possible to enter only Target Value and Assortiment Module, and then Material is chosen automaticaly (any technical number).
Thanks in Advance,
Ruslan.
2008 Jan 17 6:07 AM
Hi,
You can either use enhancements like EXITs or BADIs or use transaction variants for this.
Regards,
Renjith Michael.
2008 Jan 17 6:30 AM
I changed userexit_check_vbap to solve the problem
FORM USEREXIT_CHECK_VBAP USING US_DIALOG.
IF VBAK-AUART EQ 'WK1'.
VBAP-MATNR = 'tech. number'.
ENDIF.
ENDFORM.
than I changed userexit_check_vbap userexit_field_modification with the following code in order to hide the field Material
FORM USEREXIT_FIELD_MODIFICATION.
IF screen-name = 'RV45A-MABNR'. " Material
SCREEN-INPUT = 0.
modify screen.
ENDIF.
ENDFORM.
Changes in userexit_field_modification don't work, that is, the Field Material isn't hidden in the screen of the transaction.
Thanks in Advance,
Ruslan.How to hide field in userexit_field_modification
Edited by: Ruslan Burhanov on Jan 17, 2008 7:52 AM
2008 Jan 17 7:10 AM
Ruslan
Can you try as below:
IF screen-name = 'VBAP-MATNR'.
screen-input = 0.
MODIFY screen.
ENDIF.
Regards
Eswar
2008 Jan 17 7:28 AM
Unfortunately, this variant doesn't work either.
i don't understand why this userexit doesn't work for field Material
Thanks in Advice,
Ruslan.
2008 Jan 17 7:34 AM
Hi,
Just try like:
FORM USEREXIT_FIELD_MODIFICATION.
loop at screen.
IF screen-name = <your screen field>. " Material
SCREEN-INPUT = 0.
modify screen.
ENDIF.
endloop.
ENDFORM.
because before using modify screen statement you have to use loop..endloop.
Regards,
Renjith Michael.
2008 Jan 17 9:00 AM
Hi,
Please try writing the following code:
IF screen-name = 'RV45A-MABNR'.
screen-invisible = 1. "If you want to hide it
screen-input = 0. "If you want to disable it
MODIFY screen.
ENDIF.
Or you could create transaction variants.
Process to create transaction variants:
1. Create a screen variant for that screen on which the field exists.
2. Create a transaction variant and assign the above created screen variant to it.
3. Activate the transaction variant.
4. Execute the transaction.
Edited by: Sagar Nawathe on Jan 17, 2008 10:10 AM
2008 Jan 17 10:27 AM
Hello Gurus,
I created screen variant for transaction variant where i chose option "output only" for the field Material . Then I activate and run it. Nevertheles, there were not any changes in the Field Material.
And :
IF screen-name = 'RV45A-MABNR'.
screen-invisible = 1. "If you want to hide it
screen-input = 0. "If you want to disable it
MODIFY screen.
ENDIF.
this code doesn't work either.
maybe, someone knows other ways to solve the problem.
Thanks in Advice,
Ruslan.
Edited by: Ruslan Burhanov on Jan 17, 2008 11:34 AM
2008 Jan 17 10:41 AM
Hey man what you are trying is perfect a small change is required like below:
if screen-name = 'RV45A-MABNR'.
screen-input = 0.
endif.
Modify screen is not requierd.
Hope it would solve your issue.
Cheers
Somnath
2008 Jan 17 11:10 AM
Hi,
thank you for your help but i tried all this ways. unfortinutely, niether of them works.
both conditions "if screen-name = 'RV45A-MABNR' " and " IF screen-name = 'VBAP-MATNR' " do not trigger
maybe, it is due to the fact that this field is a column of control (table).
i'm out of ideas, and i still hope that you'll help me.
Thanks in Advice,
Ruslan.
2008 Jan 17 11:25 PM
I guess your question is not clear,
Do you want to suppress the 'RV45A-MABNR' field cause the above answers are to suppress from display, it might be a required entry in your configuration so make it mandatory to non-mandatory field. or you can code as below to make it non-mandatory i think it should work,
FORM USEREXIT_FIELD_MODIFICATION.
IF screen-name = 'RV45A-MABNR'. " Material
SCREEN-required = 0.
ENDIF.
ENDFORM
Or what i understood from your vary first post you want to pupulate material value in to this field based upon Target Value and Assortiment Module value, so my question is can you find material value based upon these values? if yes then take out the material based upon valus and put it into field 'RV45A-MABNR'
But it should not be in form "USEREXIT_CHECK_VBAP USING US_DIALOG"as its not going there if their is no material, well i didt found your fields Target Value and Assortiment Module value, you need to find exit which hits when you enter these values, and code as per your requirement.
i think i made it clear.
let me know the feedback
2008 Jan 18 5:08 AM
Hi Mandy,
I had searched in the forum threads like mine. Its I need to make ordered qnty field (RV45A-KWMENG) disabled in 'VA01/VA02' .
And in my case I need to make ordered material field (RV45A-MABNR) disabled in VA41.
User should not be able to edit this material field.
For above thread you answered to tried follow code :
CHECK ( sy-tcode = 'VA01' OR sy-tcode = 'VA02' ) and
( ( vbak-auart = 'OR') AND/OR (VBAP-PSTYV EQ 'TANN') )
CASE screen-name.
WHEN 'RV45A-KWMENG'.
IF sy-subrc ne 0.
screen-input = 0.
ENDIF.
endcase.
I also tried code like this :
CHECK sy-tcode = 'VA41' and vbak-auart = 'WK1'
CASE screen-name.
WHEN 'RV45A-MABNR'.
IF sy-subrc ne 0.
screen-input = 0.
ENDIF.
endcase.
Follow code also didn't work:
FORM USEREXIT_FIELD_MODIFICATION.
IF screen-name = 'RV45A-MABNR'. " Material
SCREEN-required = 0.
ENDIF.
ENDFORM
But this code didnt work in my case.
I hope that you help me in my problem.
Thanks in Advice,
Ruslan.
Edited by: Ruslan Burhanov on Jan 18, 2008 6:09 AM
Edited by: Ruslan Burhanov on Jan 18, 2008 6:10 AM
2008 Jan 18 2:59 PM
Well sorry but i didt under stand your requirement, is it the business requirement? it can be if you are craeting with reference to other document.
secondly i guess its not possible for VA41. i didt found any exit through debugging for va41.
or you can try with functional guy to set it to display field through configuration.
thirdly u can use screen variant if you want it only for a particular end user.
thanks
2013 Dec 03 7:33 AM
Hi ,
Try below code :
FORM USEREXIT_FIELD_MODIFICATION.
IF screen-name = 'MABNR'. " Material
SCREEN-input = 0.
ENDIF.
ENDFORM
no need to loop or modify the screen ..
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |