cancel
Showing results for 
Search instead for 
Did you mean: 

Including validation in questionnaire

Former Member
0 Kudos

Hi,

We are creating questionnaires to send after the supplier registration. I want to add some validation to the HTML page being designed for questionnaire.

<b>Example</b> :When the supplier selects 'Yes'; we want to make sure the supplier gives an explanation at this point. If they don't fill it out, an error message

should pop-up when submitting the questionnaire.

Where can we do this in SRM?

Thanks,

Sivagami.R

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi

<u>Yes it is possible to do validation.

Refer to any of these 2 BADIs in SE18 Transaction.</u>

1) <b>BADI - ROS_REQ_CUF.</b>

<u>Definition of Required Fields for Customers</u>

Use
Using this BAdI, you can define mandatory fields. After the implementation the mandatory fields are displayed on the log-on page with a red asterisk.



Standard settings
In the standard there is no check of the mandatory fields you have defined. You must program the check yourself by implementing a further BAdI (ROS_BUPA_DATA_CHECK). The mandatory fields defined in the standard cannot be deactivated.


Activities
Program the method SET_REQ_FIELDS.

Functionality
With this method you can define required fields. Set the parameter ES_REQ_CUF of type ROS_CUF_REQ_FIELDS Fill the individual fields of the structure ES_REQ_CUF with 'X' as shown in the example below.

Example
method IF_EX_ROS_REQ_CUF-SET_REQ_FIELDS.

*customer defined mandatory fields

MOVE 'X' TO ES_REQ_CUF-XNAME2.

MOVE 'X' TO ES_REQ_CUF-XCO_NAME.

MOVE 'X' TO ES_REQ_CUF-XDUNS_ID.

endmethod.



----


2) <b>BADI - ROS_BUPA_DATA_CHECK</b>

<u>Field Checks for Customer-Defined Required Fields</u>

Use
This BAdI contains two methods for checking and controlling the entries on the self-registration screen in Supply Base Management.

Activities

Program the methods
->CHECK_COMPULSORY_DATA and
-> CHECK_DUPLICATES.

See this link for additional info.

http://help.sap.com/saphelp_srm50/helpdata/en/b2/a298403de08368e10000000a1550b0/frameset.htm

Hope this will help.

Please reward suitable points, incase it suits your requirements.

Regards

- Atul

Former Member
0 Kudos

Hi,

Thanx for ur reply. I want to do validation in the <b>quesionnaire</b> and not in the supplier registration page.

Any clues???

Thanks,

Sivagami.R

Former Member
0 Kudos

Hi Sivagami,

validation / checks within the questionnaires you are looking for are not possible.

The survey cockpit it pretty static in that perspective. Only chance I know is doing

it custom. Maybe you can put some java script into the questionnaire. But the

efforts are not worth the value.

Thanks,

Claudia

Former Member
0 Kudos

Hi,

Thanx for ur reply.

If we hav to add the javascript where shld we do?

Also there are some options like including <b>conditions and event handlers</b> in the page. Will tht be useful? If we use the event handler, it is asking for function to be processed.Where can we create the function?

These are all done in Tcode ROS_QSTN_SURVEY.

Thanks,

Sivagami.R

Former Member
0 Kudos

Hi

Some OSS notes, which will definitely help in Javascript, survey mandatory questions , etc.

Please have a look to these OSS notes.

<b>830261 Survey: Validation of questionnaires

Note 1033727 Mandatory Check for Activities with Status Completed 5.0

Note 879087 - SURVEY: Creating a survey in the display mode

908395 SURVEY: Error in validation BAdI

846084 Survey: Any sending address for confirmation mail

909658 Survey: Answers can be locally changed in the browser

1004256 SURVEY: Incorrect ID for TextEdit Control

1026937 CA: User responds to survey without necessary authorization

840661 SURVEY: No questionnaire in mail body

926875 SURVEY: Incorrect content in right window

879144 Field label 'REQUIRED' in English only

868640 Survey: Required entry field condition for selection list

795759 SURVEY: Java script runtime error

842657 SURVEY: Dynamic dropdown list box

838511 SURVEY: Answer option too short

681045 Using Transaction SURVEY in SAP GUI for HTML

424889 Audit: Collective note on audit survey</b>

Hope this will help.

Please reward suitable points, incase it suits your requirements.

Regards

- Atul

Former Member
0 Kudos

Hi Atul,

Thanx for ur replies.. But does not suit my requirement. I want to add the validation when the supplier fills the questionnaire.When the submit button is clicked, i have to chk <b>whether the reason is filled if he has selected 'Yes' option.</b>

There are options like including conditions & Event handler to the HTML page in Transaction ROS_QSTN_SURVEY. How it can be used?

Any clues???

Thanks,

Sivagami.R