Custom PDF Fachsheet
Requirement : Generating custom PDF Factsheet.
Standard Smart form: CRM_ACC_ACCOUNT_OVERVIEW_PRN
Standard Class: CL_UIU_PRN_ACCOUNT
Method that gets called: COLLECT_DATA
Copy the standard form to Z*SMARTFORM
Copy the standard class: ZCL_*PRN_ACCOUNT (Including all methods)
Settings in SM30: CRMV_PRN_CONTROL
Role: SAP_CRM_UIU_SLS_PROFESSIONAL or (Z*role)
External Object: BuilHeader
Form Name: Z*SMARTFORM
Class Method: ZCL_*PRN_ACCOUNT
View: 001
Settings in SM34: CRMVC_BUIL_PRT
Same as Above.
Can cross check the tables
CRMC_PRN_CONTROL and CRMC_PRN_CONTR2.
Will display some fields like name, employee responsible territory some marketing attributes, custom fields, in the factsheet:
Create the pages and windows as per your requirement and variables to print on the factsheet.
On UI, when you select the PDF Factsheet option, the method collect method of the class ZCL_*PRN_ACCOUNT gets triggered.
When you select PDF fachsheet ,
So the BP value gets stored in the print variable, you can access the same in the smart form.
Now the coding for displaying the account fax ,telephone ,name can be done in the INITILIZATION TAB.
First create the page and Text variables to hold the name and the data.
Declare the variable data to be print on the factsheet in the output parameters and in the global declaration.
If you consider the BP ID ,fax ,telephone
To get the name fax city write the coding in initialization tab
Output:
If you want to display the factsheet on the user logon language then, first maintain the required translations and then make changes in the collect method (ZCL_*PRN_ACCOUNT ).
Declare and change the control parameters and pass the FM lv_fm_name
Output :
Checks to be done:
If Z* business role is used, it should mapped to PFCG role, you can check in the table crmc_ui_profile, else the more option will be in disabled mode.
Hope it helps!!
Hello Anita,
Thank for the nice step by step explanation of how to display the custom factsheet in CRM web UI, Actually I have a similar issue of displaying custom factsheet on CRM Mobile 2.0 app. We were able to successfully bring over the custom factsheet on Web but on mobile its still displaying the standard factsheet.
Can you please help me if you have any details about this?
Hi Praveen ,
we are using the REX 3.0 ,by standard it calls
FM /MAC/RSFM_BUPA_GEN_FACTSHEET
which takes the entry from the table CRMC_PRN_CONTROL,gets the z* smartform and mandatory field is bp_role .
we mainatin in su3 CRM_UI_PROFILE parameter as some Z*role and not *
Thanks,
Anitha
Hi Anitha, I have created a new class( copy standard one) , new smartform then maintained those in factsheet configuration with Zbusiness role as per your wiki.
I am able to see the button name under "More" option in account BP, but when I click on that it is NOT triggering.
Could you please help me in this. Do i need to do anything ?
regards,rama
Hi Ram ,
were you able to trigger?
Thnaks,
Anitha
hi Anitha, Yes .. close to 1 year back.
SAP has provided one sap notes for multiple fact sheets.
2104590 - Use of multiple PDF factsheets in account overview pag
regards,rama