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

Creating Function Module with Material type

Former Member
0 Likes
537

Hi All,

I need to create a Function module with material type parameter that reads the custom u201CZu201D config table with field MTART and returns a flag indicating if the item is a blocked material. Please help in steps how i do this.

Many thanks,

1 ACCEPTED SOLUTION
Read only

former_member156446
Active Contributor
0 Likes
501

code could look some thing like this

select single mtart from mara.

if sy-subrc eq 0.

flag = X.

else.

endif.

as its a FM you can catch exceptions and use that exceptions, in which ever program you call it...

3 REPLIES 3
Read only

Former Member
0 Likes
501

Hi,

Create a Function Group. From the menu bar of SE37 you can see GOTO->function group->create.

Give your function module name->create->function group ->short des->in imports give MTART in parameter name -> Associated type give MTART-> in export->give the name of the output ->type->mtart.

And write the validation code in the source code tab.

Cheers!!

VEnk@

Read only

0 Likes
501

Thanks Venkat and Jay, I really appreciate you guys for your time.

Read only

former_member156446
Active Contributor
0 Likes
502

code could look some thing like this

select single mtart from mara.

if sy-subrc eq 0.

flag = X.

else.

endif.

as its a FM you can catch exceptions and use that exceptions, in which ever program you call it...