How to do screen validation on cutom infotype
I have ccreated a custom infotype with four fields.Now i want to validate that when we enter data in infotype using PA30 and save it, the system should raise an error if all the fields are not filled with values.
Hello,
You can do the coding for validation in PAI MPXXXX30.
Here check whether all fields are populated.
reward points if useful.
Regards,
Manoj.
Message was edited by:
manoj kumar
Similar Messages
-
HOW TO IMPLEMENT SCREEN VALIDATION IN LDB?
Hi,
I am making use of Logical Database in my report, and I want to do screen validation with the screen which already exists in the system? Is it possible to do so? If yes, then how? The LDB, I am using is PSJ.
Also, I would like to know, can we define our own selection screen incase of LDB? How is that possible if the answer is yes to it.BUt here I am not talking about dynamic selection screen. What I mean to say is that..., can we restrict the selection screen in LDB, by defining the fields which are required in the selection screen on execution of the report?
Someone, please guide.
Points will be rewarded for a satisfactory answer.
Thanks & Regards,
RaviHi Ravi,..
Chk out the link - http://help.sap.com/saphelp_erp2005/helpdata/en/60/183d78163011d2953c0000e8353423/frameset.htm
Yes, we can define our own selection screen and that will come right below your LDB selection screen.
AND also LDB selection screen can be restricted ..for this you have to code in PBO of report for hiding the elements which u don't required.
Regards
Mithlesh -
How to do the Validations in Report Programming?
How to do the Validations in Report Programming?
how to do screen Validations and Field Validations if posssible can any one send the code regarding the Validation ....
Tks
DurusojuAT SELECTION-SCREEN - selscreen_event
Syntax
| { ON {para|selcrit} }
| { ON END OF selcrit }
| { ON BLOCK block }
| { ON RADIOBUTTON GROUP radi }
| { }
| { ON {HELP-REQUEST|VALUE-REQUEST}
| FOR {para|selcrit-low|selcrit-high} }
| { ON EXIT-COMMAND }.
Alternatives:
1. ... OUTPUT
2. ... ON {para|selcrit}
3. ... ON END OF selcrit
4. ... ON BLOCK block
5. ... ON RADIOBUTTON GROUP radi
6. ... { }
7. ... ON {HELP-REQUEST|VALUE-REQUEST} FOR
{para|selcrit-low|selcrit-high} }
8. ... ON EXIT-COMMAND
Effect
These additions allow individual evaluation of specific elements of the selection screens of the program. The information as to which selection has triggered the event is contained in the system field sy-dynnr.
Alternative 1
... OUTPUT
Effect
This event is triggered at the screen event PBO of a selection screen. In the event block, the selection screen can be prepared through assignments to the data objects of parameters and selection criteria and through dynamic screen modifications.
Note
The assignments to input fields in the event block AT SELECTION-SCREEN OUTPUT always affect the selection screen and overwrite the user inputs from previous displays of the same selection screen. Assignments in the event blocks LOAD-OF-PROGRAM oder INITIALIZATION, on the other hand, only have an effect at first program start.
Alternative 2
... ON {para|selcrit}
Effect
This event is triggered at the screen event PAI of a selection screen if the content of the input field of a parameter para or a line of a selection criterion selcrit was passed to the ABAP program. In the event block, the user input can be checked. Sending a warning or an error message in the event block makes the fields para and selcrit ready for input again.
No parameter that is defined as a radio button can be specified. For this purpose, the addition ON RADIOBUTTON GROUP is provided.
Note
If a user action takes place in the dialog box for the multiple selection of a selection criterion selcrit, the entries of the selection table are passed to the program, line by line. For each line, the event AT SELECTION-SCREEN ON selcrit is triggered.
Alternative 3
... ON END OF selcrit
Effect
This event is triggered after the selection table selcrit has been fully passed to the program after a user action in the dialog box for the multiple selection has taken place. In the event block, the entire selection table can be checked.
Alternative 4
... ON BLOCK block
Effect
This event is triggered at the screen event PAI of a selection screen if all the input fields of a block block of the selection screen were passed to the ABAP program. In the event block, the user inputs can be checked. Sending a warning or an error message in the event block makes all the fields of the block block ready for input again.
Alternative 5
... ON RADIOBUTTON GROUP radi
Effect
This event is triggered at the screen event PAI of a selection screen if all the fields of a radio button group radi of the selection screen were passed to the ABAP program. In the event block, the user input can be checked. Sending a warning or error message in the event block makes all the radion buttons of the block radi ready for input again.
Note
The individual fields of a radio button group are not passed individually and do not trigger the event AT SELECTION-SCREEN ON par.
Alternative 6
Effect
The event AT SELECTION-SCREEN itself is triggered as the last event of selection screen processing if all the input values were passed to the program. In this event block, all the user inputs can be checked. Sending a warning or an error message in the event block makes all the screen fields ready for input once again.
Alternative 7
... ON { HELP-REQUEST | VALUE-REQUEST } FOR
{para|selcrit-low|selcrit-high} }
Effect
The two events ON HELP-REQUEST and ON VALUE-REQUEST are triggered at the screen events POH and POV of a selection screen if - for the input field of a parameter para or one of the input fields of a selection criterion selcrit - the field help F1 or the input help F4 was called. Other selection events are not triggered.
In the event blocks, a self-defined field or input field can be programmed, which overrides any helps possibly defined in the ABAP Dictionary.
Notes
These event blocks can only be implemented for fields of the selection screen that are defined in the same ABAP program and not in a possibly linked logical database.
With the events for the field and input help, no data is transported between the selection screen and the ABAP program. As with general screens, suitable function modules must be used for these. The parameters and selection criteria changed for the input help are transported to the selection screen.
Alternative 8
... ON EXIT-COMMAND
Effect
This event is triggered if the user has called one of the functions Back, Exit or Cancel. In the event block, possible clean-up actions can be executed.
Example
In these executable programs, a standard selection screen and a further selection screen are defined. In the event blocks AT SELECTION-SCREEN, the inputs in the selection screens can be specially handled using the name p_carrid and the screen number in sy-dynnr.
REPORT demo_at_selection_screen.
Global data
DATA: sflight_tab TYPE TABLE OF sflight,
sflight_wa LIKE LINE OF sflight_tab.
Selection screens
PARAMETERS p_carrid TYPE spfli-carrid.
SELECTION-SCREEN BEGIN OF SCREEN 500.
SELECT-OPTIONS s_conn FOR sflight_wa-connid.
DATA s_conn_wa LIKE LINE OF s_conn.
SELECTION-SCREEN END OF SCREEN 500.
Handling selection screen events
AT SELECTION-SCREEN ON p_carrid.
IF p_carrid IS INITIAL.
MESSAGE 'Please enter a value' TYPE 'E'.
ENDIF.
AUTHORITY-CHECK OBJECT 'S_CARRID'
ID 'CARRID' FIELD p_carrid
ID 'ACTVT' FIELD '03'.
IF sy-subrc = 4.
MESSAGE 'No authorization for carrier' TYPE 'E'.
ELSEIF sy-subrc <> 0.
MESSAGE 'Error in authority check' TYPE 'A'.
ELSE.
IF sy-ucomm = 'ONLI'.
CALL SELECTION-SCREEN '0500'.
ENDIF.
ENDIF.
AT SELECTION-SCREEN.
IF sy-dynnr = '0500'.
IF s_conn IS INITIAL.
MESSAGE 'Please enter values' TYPE 'W'.
ELSE.
SELECT *
FROM sflight
INTO TABLE sflight_tab
WHERE carrid = p_carrid AND
connid IN s_conn.
IF sy-subrc <> 0.
MESSAGE 'No flights found' TYPE 'E'.
ENDIF.
ENDIF.
ENDIF.
Main program
START-OF-SELECTION. -
Screen validation for BAPI_ENTRYSHEET_CREATE
Hi All,
We are using BAPI_ENTRYSHEET_CREATE to create entry sheet for work orders,
we are passing WBS element to table parameter 'entrysheetaccountassignment 'and entry sheet created successful,
if we passing incorrect WBS element,BAPI is not validating(through transaction it's validating),
Entry sheet created succecdully but , if we check in transaction ML83 the WBS field is blank,
how to check screen validation,
Regards,
Suresh.D
Edited by: suresh dameruppula on Apr 23, 2010 2:37 PMHi,
this BAPI does not perform validation. It just converts WBS from external format into internal format. In case of invalid conversion it clears WBS element field. Hence if you want to have a WBS validation then you need to do it by yourself using BAPI BAPI_PROJECT_EXISTENCECHECK.
Cheers -
Hi Experts,
Please can any one give me the details ..
1)What is the actual use of selection screen validation?
2) When we use Selection-screen validation?
3)If we are not written the selection-screen validation is there any effect?
I know how to write the validation for a selection screen. But why i am asking above questions is I am very new to ABAP .My Functionl people also new to ABAP. They told me one report.I asked me what are the validation for selection screen . At that time they told there is no validation.
Thats the reason to ask above questions..
please tell me the details..
Thanks In Advance..
Thanks and Regards
Siri..Abhi,
Selection Screen Validation are used for correct input processing.
Selection screen elements are used further in select queries to fetch data. if user enters some wrong input
we will unnecessarily hit the data base with wrong values and select will fail , hence validation of the input
will avoid unnecessary data base hit.
<REMOVED BY MODERATOR>
Edited by: Alvaro Tejada Galindo on Feb 27, 2008 12:26 PM -
How to deal with validation errors from DAO layer.
I have been pondering on how to deal with validation errors from DAO layer.
Lets say you have a DAO that can save a car object. A car has a year, make, model, vin and so on. During the save operation of this DAO, it validates the car attributes to see if they pass some business rules. If it does not it throws some validation exception that contains all the validation errors. These validation errors know nothing about jsf or my components it just knows what attributes on the object are invalid and why.
If I just want to show those errors at the top of the page that would be no problem I could just create some FacesMessage objects and add them to the FacesContext messages. But if the DAO layer is telling me that the make attribute is invalid it would be nice to map it to the make field on the screen. I am wondering if any of you have tackled this problem or have some ideas on how to tackle it?
BrianLet it throw an exception with a self explaining message, then catch it and embed that message in a FacesMessage.
Or let it throw more specific exception types (InvalidCarMakeException extends CarDAOException and so on) and let JSF handle it with own FacesMessage message. -
Problem in selection screen validation.
Hi All,
I am having the following in the selection screen:
PARAMETERS : p_r1 RADIOBUTTON GROUP grp DEFAULT 'X' USER-COMMAND dlvy,
p_r2 RADIOBUTTON GROUP grp .
SELECTION-SCREEN BEGIN OF BLOCK b1 with frame title text-001.
SELECT-OPTIONS: s_vbeln FOR lips-vbeln MODIF ID dly.
SELECT-OPTIONS: s_lfart FOR likp-lfart OBLIGATORY MODIF ID dly.
SELECT-OPTIONS: s_vstel FOR likp-vstel MODIF ID dly.
SELECT-OPTIONS: s_matnr FOR lips-matnr MODIF ID dly.
SELECT-OPTIONS: s_wadat FOR likp-wadat OBLIGATORY MODIF ID dly.
SELECT-OPTIONS: s_wbsta FOR vbup-wbsta MODIF ID dly.
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b2 with frame title text-002.
SELECT-OPTIONS: s1_matnr FOR lips-matnr MODIF ID mat.
SELECT-OPTIONS: s_extwg FOR mara-extwg MODIF ID mat.
SELECT-OPTIONS: s_werks FOR marc-werks MODIF ID mat.
SELECTION-SCREEN END OF BLOCK b2.
If I choose Radio Button 1, only option 1 should be triggered,
If I choose Radio Button 2, only option 2 should be triggered,
For this I have:
AT SELECTION-SCREEN OUTPUT.
IF p_r1 = 'X'.
blk_hide = 'MAT'.
blk_show = 'DLY'.
ELSE.
blk_hide = 'DLY'.
blk_show = 'MAT'.
ENDIF.
LOOP AT SCREEN.
IF screen-group1 = blk_hide.
screen-active = 0.
ELSE.
IF screen-group1 = blk_show.
screen-active = 1.
ENDIF.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
Now I need to validate the selection Screen, I am facing issue in doing selection screen validation:
Can any one help me in how to go about this?
Thanks,
Debrup.pls. replace the AT SELECTION-SCREEN OUTPUT event with this one:
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
CASE 'X'.
WHEN p_r1.
CASE screen-group1.
WHEN 'DLY'.
screen-active = '1'.
WHEN 'MAT'.
screen-active = '0'.
ENDCASE.
WHEN p_r2.
CASE screen-group1.
WHEN 'DLY'.
screen-active = '0'.
WHEN 'MAT'.
screen-active = '1'.
ENDCASE.
ENDCASE.
MODIFY SCREEN.
ENDLOOP. -
Raising Exception in Selection screen validation
Hi All,
I am doing a selection screen validation in BI report using the CMOD. If my validation fails i need to raise a error message instead showing the report. How can i perform that. How should i handle this using abap.
Thanks in advance
PremHi,
But this does not stop the execution of the report, the error message which i have given is been displayed in the report top and still the report gets executed.
Please suggest how to stop the report execution and to stay on the same selelction screen page.
Thanks
Prem -
Selection Screen Validation for Character
Hi All
My query is regarding the selection screen validation for character.
I am using a Select-option: S_ORDER FOR VBAK-VBELN OBLIGATORY.
and S_order should be only having the numeric field.
Please help how to validate it for character field.Hi,
Do as below :
at selection-screen.
if not s_order[] is initial.
if s_order-low CA 'ABCDEF.............Z'.
message 'Enter only numerics only' type 'E'.
endif.
"similarly for s_order-high also.
endif.
Thanks,
Sriram Ponna. -
Hi Experts,
How can i do the screen validations with Ranges. The below is the Description in the Func. Specs.
Posting date-FAGLFLEXA-BUDAT-Range with F4 help on date. Single Multiple values should also work
G/L Account-FAGLFLEXA-RACCT-Range with F4 help. Single Multiple values should also work
Validation: Verify that this FAGLFLEXA-RACCT is maintained as KONTS in the table T030K. The chart of account T030K-KTOPL required to access this table can be found by entering Company code BUKRS into table V_001_S and pick up V_001_S-KTOPL.
Thanks & Regards,
RamanaAs per your question u are using select-option.
select-option is nothing but it creates internal table.
suppose if u r using S_date then it creates internal table of same name containing sign,opt,low, high columns
If you put range then s_date-low contains <lower limit> & s_date-high higher <higher limit>
i.e.
s_date = 01.05.2008 to 05.05.2008
then
s_date-low = 01.05.2008
s_date-high = 05.05.2008
like that
and if you put multiple values like diffrent dates
then i appends that multiple date in to s_date-low
ie
s_date = 01.05.2008
03.05.2008
06.05.2008
then it will appear as
sign opt low high
I EQ 01.05.2008
I EQ 03.05.2008
I EQ 06.05.2008
in select option.
Now i guess u will clear with the select option concept
Accordingly you can use LOOP STATEMENT on S_DATE
either in AT-SELECTION screen or in INITIALIZATION
Hope you will get an Answer
Regards ,
Swarup -
How to add search help to custom infotype listbox??
Hi All,
How to add search help to custom infotype listbox??
Thanks in advanceHi Vinay,
We have search help and list box as 2 different options.
At a time we can make a field a list box or a search help.List box is restricted and we can pick values from the defined list whereas in search help we can allow more entries and then validate the value entered later.
Implementing a listbox or search help in infotype is same as that of implementing it in a modulepool .
for search help..we can create a custom search help or check for existing search help in se11
then in the screen on infotype field..assign the search help direcly at the screen painter level..
double click on the field in screen painter -> change mode and then in the space for "search help" enter the search helps name
for list box..in the screen painter ,make sure the field is selected as list box..then in PAI of screen we do a
(Process on value-request..field fieldname module module name)..check syntax and other details...
Using function module vrm_set_value fill the field and populate it as required
Pls check and revert
Regards
Byju -
How to create new subtypes for OM infotype 1002?
Gurus,
I have a requirement to create four new subtypes (to different texts ) for OM infotype HRP1002.
Let me know the procedure to achieve this.
I looked in subtype table T591A and T591S, but couldn't find any subtype (even the standard ones like 0001,0002,0003 etc) for 1002 infotype.
Thanks,
Amit JainHi Amitkumar Jain,
I am also facing same problem, i need create Infotyes with Subtypes in OM.Check below steps how i created
1. I create Structure in se11. HRI9119
2. In PPCI , i create infotype 9119
3.In SM30 , I Maintain table T777i, here i selected my infotype (9119), then i clicked on infotype per object type and assign subtype (9229, 9339) to the my infotype .
4. After that, in same screen, i selected my infotype and assign TIME CONSTANT to my all subtype and infotypes.
After this , any think required to maintain , Plz tell me.. i didn't find my subtype in PP01.
Thanks and Regards ,
Venkatesh.M -
R/3 Screen for a custom infotype must resemble same as IT0591.
Hi Guru's,
I am having a requirement to create a custom infotype same as IT0591 in r3. I searched in forum for creating the infotype in such format and i found that table control using wizard is used to update the repetetive datas. I had created a table with repetative fields and generated the infotype. When i went into r3 side it is displayed as seperate fields, i deleted all fields and using icon table control using wizard i drew a table control and declared a internal table and assigned to it and the code is generated automatically in PBO and PAI but when i compared the same with 0591 it is entirely differrent. Now my problem is how can i bring the same screen in my custom infotype. I dont know where i had missed or i am going in right path... Kindly help me to sort this issue. <removed by moderator>.
Edited by: Giriesh M on Jun 17, 2011 10:36 AM
Edited by: Thomas Zloch on Jun 17, 2011 10:53 AMIn PM01 for the custom infotype select Screen..Edit..Flow Logic. Three input/Output fields were added to the screen layout. Since all three fields were in the same table with the same field name, they all have to have unique names in the layout.
Module 9009 was modified to add code to retrieve the text.
SELECT SINGLE * FROM dd07v
WHERE domname = 'ZZHR_FML_ABSENCE_CODE'
AND ddlanguage = 'EN'
AND domvalue_l = p9009-zzfmlabccd.
select single ddtext into w_fmlstatus from DD07V
where DOMNAME = 'ZZHR_FML_STATUS_CODE' AND
DDLANGUAGE = 'E' AND
DOMVALUE_L = p9009-zzfmlstatus.
select single ddtext into w_fmlaleave from DD07V
where DOMNAME = 'ZZHR_LEAVE_TYPE' AND
DDLANGUAGE = 'E' AND
DOMVALUE_L = p9009-zzfml_leave_type.
I hope this helps. -
How to do the validation for a checklist item
I have a check item which is a date which should not allow future date. This check list item might be 1 st item or 10th or 3rd .. depending on the selection made in the previous page. How can i do validation for this item ?
thanks for your help.Hi, I am not sure of the table though for the budget, but I have one suggestion.. I'm not sure if you already know the F1-F9 button. Firstly, just put your cursor somewhere in the screen where the budget/field is located then press F1 and F9, you will see the table name, go to t-code SE11 and type in the table you've found, then go to attributes and copy the development class, open a new session using t-code SE80(Object navigator), pull down the arrow/F4 choose the development class and press the ENTER button, you will see all the related tables, function modules, transaction, programs, etc., that is related to that development class.
Hope this helps. =) -
How to use the validation work in Both TAB and Mouse keys in Forms6i
Hi,
I have a validation script once it's validated it should execute the query.But using When-Validate-Item i can't use execute_query.I am able to use the validation in Key-Next-Item trigger but if the user moves the cursor using mouse then it's not working.
How to use the validation script working in Both Scenarios(Tab and Mouse keys).
Can anyone please give inputs to rectify the above issue?.So you have multiple fields, but on at least one of them if it's valid you immediately want to execute the query?
You could create a hidden field in a control block Query_Now default 'N'. In a WHEN-VALIDATE-ITEM on your item, if it's determined to be valid, then set Query_Now to 'Y'.
In a WHEN-NEW-ITEM-INSTANCE at block level, check if Query_Now is 'Y'. If it is then execute the query (and set it back to 'N').
Maybe you are looking for
-
How do I save changes to a document using VPN, Safari and Excel Mac?
Hi. I'm using VPN to reach documents on a server. I want to make changes to an excel document and save the changes back to the server. I'm using Safari and Excel Mac. When I'm finish making changes I tried to save the document back to the server. The
-
Strange query / explain plan
(I posted this in the Oracle Text forum, but I think it's as appropriate here.) Consider the following queries: :the_filter := 'FILE'; (1) SELECT COUNT(*) FROM FOO WHERE CONTAINS(search_col,:the_filter) > 0; (2) SELECT COUNT(*) FROM FOO WHERE 'FILE'
-
Hi, I was going through some matter on creating a data dictionary project with a corresponding web module project at: http://help.sap.com/saphelp_nw04/helpdata/en/6c/c8bbdc13a8435fa4e0d7ccd97bb1ea/frameset.htm But Im stuck here with 2 doubts: When I
-
If I execute the command: emca -config dbcontrol db -repos create the following error comes back (after I enter the SID): UnsatisfiedLinkError exception loading native library: njni11 Exception in thread "main" java.lang.UnsatisfiedLinkError: get at
-
HP Pavilion Elite h8-1380t is a GTX970 Graphics Card Compatible?
I need a graphics card that will allow acceleration in adobe illustrator. I'm just not sure what is compatible with this PC but I am looking at a GTX970 . I am a freelance designer and illustrator hangs and large files take forever to export so I nee