cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple fields in WebRFC / OR Condition when using IF for scripting

former_member188001
Active Participant
0 Kudos

Hello all,

I know we can use Webrfc . I followed the following link to achieve it. http://scn.sap.com/docs/DOC-35565

The question is, I am creating a Sales Order by caching lot of tabs into 1. I want to check the In-completion log before hitting SAVE using webrfc and giving message to the user.

Basically, when the user hits SAVE button, I want to call webrfc for the fields which are part of incompletion log and check if they are populated, if not, then give a message else call SAVE.

Is it possible to call webrfc only once and pass all the incompletion fields to check.

The other option is to use IF condition on those incompletion fields which will not need any webrfc call but again, I did not see a place where i can use OR conditions for multiple fields in the same IF statement.

Any help is highly appreciated.

Regards,

Salil

Accepted Solutions (1)

Accepted Solutions (1)

tamas_hoznek
Product and Topic Expert
Product and Topic Expert
0 Kudos

There is no OR statement but you could have two IFs... after the webRFC, the first one would be IF document is complete, then push Save. The second one is IF document is not complete, issue the message (and don't push Save of course).

former_member188001
Active Participant
0 Kudos

Thanks Tamas.

So you are saying that we can check all the fields in one go via webrfc.

Also, i was checking an option to issue a message in case of failure but there doesnot seem to be any condition.  I found the one which is for Comments but it does not do anything. Not sure what I am missing.

tamas_hoznek
Product and Topic Expert
Product and Topic Expert
0 Kudos

Well, if you do have a webRFC which performs the incompletion check, then of course one call is sufficient. You'd probably have to wrap the standard incompletion procedure call and provide it as a webRFC.

As for the error message: you cannot change the standard message bar text, so you have two options: either have a custom label (or display-only text field) which you will use to display the message or a JavaScript alert statement displaying a message in a popup.

former_member188001
Active Participant
0 Kudos

I am trying that option, will keep you posted.

My javascript is failing.

I am trying to get the value from one of the column of the table for the selected row.

following is my script

I also checked the link

Can someone please help.

Thanks,

Salil

Answers (0)