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. Moving forward, myibi is our community platform to learn, share, and collaborate. We have the same Focal Point forum categories in myibi, so you can continue to have all new conversations there. If you need access to myibi, contact us at myibi@ibi.com and provide your corporate email address, company, and name.


Connect to myibi
Focal Point    Focal Point Forums  Hop To Forum Categories  iWay Software Product Forum on Focal Point    how to use SAP function module

Read-Only Read-Only Topic
Go
Search
Notify
Tools
how to use SAP function module
 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
Yeah, I don't think you're the only one that would like to join a table into SAP. All we ended up doing is looping the hold file into 1 long WHERE statement. We only were using it for a 10-100 "orders" so it wasn't that big of an issue.

Here's the code in case you were thinking of doing something similar:

-SET &NUMLINES = &LINES;
-READ HOLD NOCLOSE &CUSTOMER.A7.
-SET &IFCUST = '''' || &CUSTOMER || '''';
-TOPLOOP
-READ HOLD NOCLOSE &CUSTOMER.A7.
-SET &NUMLINES = &NUMLINES - 1;
-IF &NUMLINES LT 1 THEN GOTO ENDLOOP;
-SET &IFCUST = &IFCUST || ' OR ' | '''' || &CUSTOMER || '''';
-GOTO TOPLOOP;
-ENDLOOP
-CLOSE HOLD
  


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
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  iWay Software Product Forum on Focal Point    how to use SAP function module

Copyright © 1996-2020 Information Builders