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

FM BAPI creation

Former Member
0 Likes
782

Hi all,

I have a reuirement to cretae a BAPI FM with the logic of a report to be the source code.

But in the report I have the selection screen components as select-options.

for eg

SELECT-OPTIONS : ebeln FOR ekko-ebeln,

ebelp FOR ekpo-ebelp.

How do I map this select-option fields to the import parameters of the BAPI as they are like internal tables.

Pls help with your ideas.

Thanks,

stock

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
754

Hi,

We have the Structures, look at these structures structure RANGE_C8, this will have the LOW and HIGH are character length 8. If you need a bigger field than that then use RANGE_C9, if you press F4 for RANGE_C* then you will find all the Range predefined structures

Regards

Sudheer

5 REPLIES 5
Read only

Former Member
0 Likes
754

Hi

Check some structures like <b>WSELKUNNR</b> which is of internal table for select-options .check in Se11.

so declare your import parameter type wselkunnr.

Reward points if useful

Regards

Anji

Read only

0 Likes
754

Hi,

I could get the structure for other fields, but I need for EBELN, EBELP and LBLNI fields.

How do i get one or if needed where can I create a new type structure for this individual fields?

Thanks,

stock

Read only

Former Member
0 Likes
755

Hi,

We have the Structures, look at these structures structure RANGE_C8, this will have the LOW and HIGH are character length 8. If you need a bigger field than that then use RANGE_C9, if you press F4 for RANGE_C* then you will find all the Range predefined structures

Regards

Sudheer

Read only

Former Member
0 Likes
754

Hi,

For EBELN, you can use RANGE_C10 structure, look at that strucutre, so based on the length you can use these Range Structures

Regards

Sudheer

Read only

0 Likes
754

Hi,

I am creating a BAPI and read that the structure used in the import has to be user defined.

So I am trying to create a user defined structure by using "TYPES".

I am declaring the "TYPES" in the Function group top include, created for the BAPI and giving the import statement in the BAPI as "i_ebeln type T_EBELN" but it gives me error like " The TYPE T_EBELN is not found"

I have declared the types in the FN grp and am getting the error, where else do i have to declare the " types"to avoid the error.

Pls help with your ideas.

Thanks,

Stock