Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

IF

Former Member
1 ACCEPTED SOLUTION

Former Member
0 Kudos

Just make them mandatory.

Rob

14 REPLIES 14

Former Member
0 Kudos

Just make them mandatory.

Rob

0 Kudos

Hi Rob ,

Thanks for response, But how to make the fields are mandatory

in bapi import parameters if the fields data types r dec and values r 00.00 in

default.

Please answer.

Thanks,

SB.

0 Kudos

You said "your BAPI". Is this a standard BAPI instead?

Rob

0 Kudos

Rob,

Its custom BAPI, Im using structure for import paramters with all 5 fields.

SB

0 Kudos

So it's a little different than you originally said. A structure with five fields isn't the same as five parameters. You can check the individual fields using just about any of the ideas already given.

Rob

JozsefSzikszai
Active Contributor
0 Kudos

hi,

IF para1 IS INITIAL OR

para2 IS INITIAL OR

para3 IS INITIAL OR

para4 IS INITIAL OR

para5 IS INITIAL.

error message

ELSE.

bapi

ENDIF.

hope this helps

ec

ferry_lianto
Active Contributor
0 Kudos

Hi,

Please try this.


IF P_NAME IS INITIAL AND
   P_NUMBER IS INITIAL AND
   P_ID IS INITIAL AND
   P_AGE IS INITIAL AND
   P_DESIGNR IS INITIAL.
  MESSAGE E899(BD) WITH 'Enter all values'.
ELSE.
  ...
ENDIF.

Regards,

Ferry Lianto

naimesh_patel
Active Contributor
0 Kudos

Actually in BAPI, you need to fill out the RETURN table for any kind of messages you want.

IF P_NAME IS INITIAL.
  perform  fill_return_Tab with P_name is initial.
endif.

if   P_NUMBER IS INITIAL.
 perform  fill_return_Tab with P_NUMBER is initial.
endif.

Do like this for all fields.

Regards,

Naimesh Patel

Former Member
0 Kudos

Syed,

In se37,in the import section, dont check the optional button.

Regards

Aneesh.

0 Kudos

Thanks Aneesh,

But Its decimal datatype field so default value is 00.00 , so now its contain Null value. if u untick also no use.

SB.

0 Kudos

Syed,

Then do one thing. Inside the BAPI raise an exception with an if statement.

Thanks

Aneesh.

Former Member
0 Kudos

And please do not remove the question after it is answered. Why do you do it anyway? It makes it useless for anyone trying to solve the same sort of problem.

Rob

0 Kudos

Good Point Rob. Sure is ahrd to figure oput what is going on after the content of the Message is deleted to only contain BAPI and the title is IF. The Forum is a Good Learning Tool, and sad to see this person continually erase his original posts.

0 Kudos

I believe the poster was asked to stop this by the moderator:

Anyway, he seems to have stopped.

Rob