cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SAP B1 HANA Crystal Report for Unapproved Draft.

owaisk
Participant
0 Likes
693

Hello Community,

I have created a layout cr for SAP B1 hana unapproved draft documents. with draft docnum & date parameter.

what i want is, when a user preview the layout by entering docnum & date in parameters, i need to store that docnum & date in sap and make a report of it that what document number user has previewd and on what date.

how i can achieve it ? with temp table or sap or else ??

BR,

Accepted Solutions (1)

Accepted Solutions (1)

DellSC
Active Contributor

You would have to create a stored procedure that you would call to get the data for your report instead of connecting directly to HANA tables or views. Within the stored procedure you can update data, which you can't do any other way from Crystal.

-Dell

Answers (1)

Answers (1)

JWiseman
Active Contributor
0 Likes

Some points to add to Dell's answer:

  • Ensure that your stored proc ends in a select statement or there will be an error in Crystal.
  • If you run the report directly off of the stored proc, note that the proc will be called twice in the case of HANA (and Oracle, perhaps other DBs) as the first run is to verify the field set and the second to return the record set. Solution is to use a call to the proc in a Crystal Command object.
  • You can run the insert from a subreport based on the proc so that your existing main report's DB connection doesn't need to be changed.
  • If you don't have the rights in HANA to create new tables and procs, use a separate DB like SQL Anywhere just for recording the info that you need. As mentioned this workflow should be done via a subreport.