Application Development and Automation 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: 
Read only

IF

Former Member
1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,031

Just make them mandatory.

Rob

14 REPLIES 14
Read only

Former Member
0 Likes
1,032

Just make them mandatory.

Rob

Read only

0 Likes
1,031

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.

Read only

0 Likes
1,031

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

Rob

Read only

0 Likes
1,031

Rob,

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

SB

Read only

0 Likes
1,031

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

Read only

JozsefSzikszai
Active Contributor
0 Likes
1,031

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

Read only

ferry_lianto
Active Contributor
0 Likes
1,031

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

Read only

naimesh_patel
Active Contributor
0 Likes
1,031

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

Read only

Former Member
0 Likes
1,031

Syed,

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

Regards

Aneesh.

Read only

0 Likes
1,031

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.

Read only

0 Likes
1,031

Syed,

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

Thanks

Aneesh.

Read only

Former Member
0 Likes
1,031

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

Read only

0 Likes
1,031

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.

Read only

0 Likes
1,031

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

Anyway, he seems to have stopped.

Rob