Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     How to use function modules in SAP.?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
How to use function modules in SAP.?
 Login/Join
 
Platinum Member
posted
Hi,
we have a function module in sap which if we pass order number will return the status. We created a sysnonym for this and are able to run it by itself.
TABLE FILE Z_SD_SALES_ORDER_STATUS
PRINT
T_SO_ZVBELN
T_SO_ZORDSTAT
T_SO_ZDESC
WHERE VBELN EQ '&VBELN';

But how do we pass a bunch of values into this function module and get the status without looping one by one.??
For example if we have a Hold file with just order numbers and we want to get status for all those?
I tried joining and it did not work? Any ideas?

Thanks.


App Studio Version 8202
windows Platform
SQL Server 2008/2012
 
Posts: 183 | Location: TX | Registered: January 22, 2007Report This Post
Gold member
posted Hide Post
I've run into this problem as well and I can't seem to join into any table in SAP/BW (or at least the cubes/queries) that I have tried. Not sure if you are in SAP/BW, but I'm guessing it is the same.

Therefore it only left me with 1 option, the loop.

Instead of looping the table call over and over, I simply created the table with the order numbers I wanted and then read out each order number into a "Where" statement and then simply made the 1 call with the extended Where.


Here's the code that did it:
...
ON TABLE HOLD FORMAT ALPHA
END
-RUN
-SET &NUMLINES = &LINES;
-READ HOLD NOCLOSE &ORDER.A7.
-SET &IFORDER= '''' || &ORDER || '''';

-TOPLOOP
-READ HOLD NOCLOSE &ORDER.A7.
-SET &NUMLINES = &NUMLINES - 1;
-IF &NUMLINES LT 1 THEN GOTO ENDLOOP;
-SET &IFORDER= &IFORDER|| ' OR ' | '''' || &ORDER || '''';
-GOTO TOPLOOP;
-ENDLOOP

Then simply use the &IFORDER in the table call.

I know it doesn't solve the problem for joining the tables, but it was my work around.

Leo


Prod: WebFOCUS 7.6.4 - Self Service - Windows Server2003 - Apache Tomcat 5.5
Dev: WebFOCUS 7.6.4 - Self Service - Windows XP SP2 - Apache Tomcat 5.5
 
Posts: 96 | Location: Winnipeg, Manitoba, Canada | Registered: January 22, 2004Report This Post
Virtuoso
posted Hide Post
I'm not sure on how you do it from a hold file, but if the hold file is only a list of order numbers have you considered the select where it's in a file.

IF VBELN EQ (file)

where (file) contains the orders, I usually use a FILEDEF to point to the file.

there is a where version also, I think syntax is

WHERE VBLEN IN-FILE (file)

there are limitations on how many values int the file more from a file size. Doing this from home so forgive syntax errors please


Leah
 
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004Report This Post
Platinum Member
posted Hide Post
Got it working with the help of reading from a file suggestion from leah.
Glad to know, I was not the only one who had this problem.
Leos looping suggestion was also a good idea to avoid multiple calls to the table.


App Studio Version 8202
windows Platform
SQL Server 2008/2012
 
Posts: 183 | Location: TX | Registered: January 22, 2007Report This Post
Platinum Member
posted Hide Post
Hey,
what if we need to pass multiple sets of fields into the function module.
For Example, I want to Pass sets of VBELN and WERKS . Is there a workaround for this.


App Studio Version 8202
windows Platform
SQL Server 2008/2012
 
Posts: 183 | Location: TX | Registered: January 22, 2007Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     How to use function modules in SAP.?

Copyright © 1996-2020 Information Builders