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

Call FM in Program

Former Member
0 Likes
4,568

Hi Guys,

i belong to SAP BI/Hana domain and i am stuck in 1 part of code below

I am using FM 'EPS_GET_FILE_ATTRIBUTES' in a program to fetch file attribute (Size of File).

I call this FM in a code and pass the Import parameters but i am not getting anything in return because in the FM there is an explicit check of "uppercase/lowercase" but when i call this FM from my program i don't know how to make this check.

CALL FUNCTION 'EPS_GET_FILE_ATTRIBUTES'

      EXPORTING

          FILE_SIZE = lds_size

       IMPORTING

          FILE_NAME =   gcf_filename_ortho

          DIR_NAME  =   gcf_path.

and below are the declarations i am using


      gcf_filename_ortho TYPE C LENGTH 28 VALUE 'AIN0027_INVENTORY_LEAPLIVE',

       gcf_path TYPE C LENGTH 29 VALUE '/sap/interface/APO/Outbound'.


When i execute the FM through SE37 with uppercase/lowercase checkbox ticket it gives me valid output but since i dont ensure this check in Program it doesnt return anything  How do i check this in my program to get an output?


Thanks

Nayab

9 REPLIES 9
Read only

PeterJonker
Active Contributor
0 Likes
3,097

This message was moderated.

Read only

0 Likes
3,097

I have declared both the parameters as below

   FILENAME: -   gcf_filename_ortho TYPE C LENGTH 28 VALUE 'AIN0027_INVENTORY_LEAPLIVE',


    PATH:-    gcf_path TYPE C LENGTH 29 VALUE '/sap/interface/APO/Outbound'.

How can i declare path that can hold upper and lower characters? Pl excuse me for asking this , i am not an expert in core Abap  but using it only for my BW/Hana work.

Read only

0 Likes
3,097

This message was moderated.

Read only

matt
Active Contributor
0 Likes
3,097

Variables declared in this way can hold ANY data. Alphanumeric, non-displayable characters like CR etc. And certainly mixed cases.

Read only

former_member202771
Contributor
0 Likes
3,097

This message was moderated.

Read only

amol_samte
Contributor
0 Likes
3,097

This message was moderated.

Read only

0 Likes
3,096

Still cant get the result

Read only

Former Member
0 Likes
3,096

Hi,

That checkbox is only there for testing purposes. If you give the FM values which are typed of a text type (which is the case here) then you won't have any problems.

If the function module behaves differently from SE37 then the reason is something else.

Check if the user who executed this abap has enough authorizations SU53

Also use patterns when coding function modules in ABAP (pattern button CTRL+F6)

In your example it says Exporting FILE_SIZE and importing FILE_NAME and DIR_NAME.

I guess this won't work at all.

Kind regards, Rob Dielemans

Read only

matt
Active Contributor
0 Likes
3,096

Rob's answer is correct.

What is sad are the number of nonsense answers this question received. Presumably by people who just guessed how ABAP works without testing, or in one case made up some fictional ABAP syntax.

Thread locked.