cancel
Showing results for 
Search instead for 
Did you mean: 

How to design CR layout of draft document in SAP B1 9.2?.

former_member183402
Participant
0 Kudos

Hi all,

I have a problem in CR layout of sales order draft document.

Actually I know how I can use query in creation of new CR layout and then set parameter DocKey@ to any document of SAP B1, but now I have a case of draft document where I have UDT called @MMS which has some information I want it to be displayed to my layout, so I created a simple query

SELECT T0.DocEntry, T0.[CardCode], T0.[CardName], T1.[U_dependstommiNo], T1.[U_depFname], T1.[U_depLname], T2.[Dscription] FROM [dbo].[ODRF]  T0 inner join [dbo].[@MMS]  T1 on T0.[CardCode]=T1.[Code] INNER JOIN DRF1 T2 ON T0.[DocEntry] = T2.[DocEntry]

The above query uses tables one for draft header ODRF and another for draft rows DRF1,

after doing design of layout I set parameter like this

{Command.DocEntry} = {?DocKey@}

if I finish my layout and then try to print preview it brings empty page.

What I have seen is if document is still draft it is not saved in ORDR.

My query works fine and print preview in crystal report works, the problem is in SAP client.

What can I do in order to display my new CR layout of sales order draft document?

Please anyone can help me.

Accepted Solutions (1)

Accepted Solutions (1)

edy_simon
Active Contributor
0 Kudos

Hi Rurangwa,

If you want to support draft documents, you can not use Query as the base of your data source.
Use the base tables instead, if this draft is for Order then add the table ORDR into the CR.
On printing, SBO will automatically detect you are printing a DRAFT and on runtime will change all the DOCUMENT tables (ORDR, RDR1, RDR2, etc) to Draft tables.

+ SBO will add a watermark 'DRAFT' on your report.

There isn't a need to create a specific layout for draft documents.

Regards

Edy

former_member183402
Participant
0 Kudos

Thank you so much Edy, That's good.

But is there an option of to remove a watermark from that layout?.

0 Kudos

Hi Edy,

I am having same issue while View Draft Delivery, sometimes it works layout brings up info and sometimes it shows blank.

Please suggest me what should i do as my derlivery document have all it's tables. so should i add ODRF and DRF1 in it and how do i link these tables with ODLN/DLN1 ?

I would appreciate your guidance. Thanks

Answers (0)