Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transmission too slow #20

Closed
loewechiu opened this issue Sep 9, 2016 · 3 comments
Closed

Transmission too slow #20

loewechiu opened this issue Sep 9, 2016 · 3 comments

Comments

@loewechiu
Copy link

Hi Gurus,

I use the PyRFC to pull workload data from SAP, it works fine.
However, when the SAP system is too big, it takes nearly half an hour to transfer.
Any way to optimize the below statement?

result = conn.call('SWNC_COLLECTOR_GET_AGGREGATES',
COMPONENT=u'TOTAL',
ASSIGNDSYS= self.sysname,
PERIODTYPE=u'M', ##monthly
PERIODSTRT=datetime.date(year,month,01),
SUMMARY_ONLY=u'')

Thank you very much!

BR
Loewe Chiu

@martinduffy
Copy link

I am not sure how many rows of data you are trying to retrieve. It has been
my experience that you want to write your code to pull say 1000 rows and
then the next 1000 rows, etc until you get all of the rows. It is much
faster. There are examples out there that I used when attempting to do
this. I will have to look in the code I was using at the time to find this.
I will reply if I can find something but look for examples that do
incremental retrieves of the data until it is all retrieved. It is much
faster.

On Sep 8, 2016 9:39 PM, "loewechiu" notifications@github.com wrote:

Hi Gurus,

I use the PyRFC to pull workload data from SAP, it works fine.
However, when the SAP system is too big, it takes nearly half an hour to
transfer.
Any way to optimize the below statement?

result = conn.call('SWNC_COLLECTOR_GET_AGGREGATES',
COMPONENT=u'TOTAL',
ASSIGNDSYS= self.sysname,
PERIODTYPE=u'M', ##monthly
PERIODSTRT=datetime.date(year,month,01),
SUMMARY_ONLY=u'')

Thank you very much!

BR
Loewe Chiu


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#20, or mute the thread
https://github.com/notifications/unsubscribe-auth/AFLf0UAJFEutHPeNJTaaWVDPPoy4cJhmks5qoMb7gaJpZM4J4pSG
.

@loewechiu
Copy link
Author

Thanks for your fast reply.
the output "result" contains a lot of SAP tables, and I test to print one of them into a txt file, it went 21MB.
That'll be crazy if the conn.call transfers all of them...

@bsrdjan
Copy link
Member

bsrdjan commented Nov 23, 2016

Perhaps to use multiple calls, with shorter periods, the PyRFC cant help here.

@bsrdjan bsrdjan closed this as completed Nov 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants