cancel
Showing results for 
Search instead for 
Did you mean: 

How to validate the input field data in VC using RFC FM

Former Member
0 Kudos

HI,

Could any body please give me the solution for the following issue?

When ever I enter a value in the input field of an iView, this value has to be validated from the backend BW system. Is this validation is possible using RFC function module?

If yes, please explain me.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

therefore you need to fire an event after every input. I think this is not possible with the current release, maybe I can check this on our VC CE rampup in the next days.

Best Regards,

Marcel

Former Member
0 Kudos

Hi Marcel,

Thanks,

As far as concerned to the event, it should not be an issue, as we do not have to trigger the event every time we enter value in the input field.

In my iViews the validation should work in the following way

I have three input fields, after entering the values in all the three input fields, I have a submit button to retrieve the values based on the selection criterion.

Hence this submit can be considered as a firing event.

Please let me know the remaining solution for the problem

arun_ev
Participant
0 Kudos

Hi Deepak,

For getting these RFC's in your VC you should first created the BW system in your portal by providing the required authentication. SAP has standard tempaltes for system creation which can be used. Once this is done one can search for the RFC's through their names and list them on the right hand side of VC screen.

Similar to BW queries RFC's too will have input and output ports. One can pass the data entered in the VC input form though a event to the RFC. The output similarly can be captured in a output table from the out port of the RFC. Else you can also use a input filed whose default value can be pointed to the desired output field of the RFC.

Hope this helps.

Arun

Former Member
0 Kudos

Hi,

ok that is possible. You have to create a ABAP RFC function module with three import parameters (for the three values). You have also to add an export parameter with the type string (for your message) and optional an return code. It depends on your requirements.

If you have an multilanguage application I can recommend in the backend a message class, where you can define your messages, which are passed to your export parameter during the validation and the optional export parameter (return code) for example disable a save button or if everything is fine (RC == 0) you can unhide a save button.

Best Regards,

Marcel

Former Member
0 Kudos

hi Deepak

its possible to validate from RFC

for this u need to write the validation logic in the RFC, talk to the ABAPers who can help you in this matter,

once the validation logic is there in the RFC u get the messgaes in the RETURN parameter of RFC. in tha return parameter u will get the error messages ..

those messages u can show as pop up in the VC application.

if you are ok with this then i can explain u clearly

please let me know

regards

srinivas

Former Member
0 Kudos

Hi Srinivas,

You are right!

Please let me know the further procedure like

1. How can I call these RFC's in Visual Composer?

2. How do I pass the messages returned by RFC to Visual Composer or how do I capture the returned messages in Visual Composer.

The earliest response is appreciated

Former Member
0 Kudos

Hi Deepak,

U can validate input fields using javascript.Write OnClientClick function for that submit button if ur using htmlb or onClick if u r using html.Refer the follows

http://help.sap.com/saphelp_nw70/helpdata/en/03/900e41a346ef6fe10000000a1550b0/frameset.htm

There are two ways to achieve ur task.

1.By checking for all alphabets.in this u need check all the alphabetic characters one by one.Refer the following

http://www.shiningstar.net/articles/articles/javascript/javascriptvalidations.asp?ID=ROLLA

http://www.shiningstar.net/articles/articles/javascript/checkNumeric.asp?ID=AW

2.By using regular expressions.its very easy and a single line code.here u need to specify single expression for whole alphabets.Refer this

http://aspzone.com/blogs/john/articles/173.aspx

Regards,

Naren