Quantcast
Channel: SCN : All Content - SAP CRM: Webclient UI - Framework
Viewing all articles
Browse latest Browse all 4552

Custom PDF Fachsheet

$
0
0
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.
1.PNG
When you select PDF fachsheet ,
2.PNG
So the BP value gets stored in the print variable, you can access the same in the smart form.
3.PNG
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
5.PNG
6.PNG
To get the name fax city write the coding in initialization tab
7.PNG
Output:
4.PNG
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
9.PNG
Output :
10.PNG
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.
8.PNG
Hope it helps!!

Viewing all articles
Browse latest Browse all 4552

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>