This website is not affiliated with, sponsored by, or approved by SAP AG.

Create a BP document from ABAP

CRM related discussion only

Moderators: Snowy, thx4allthefish, Lost Identity

Create a BP document from ABAP

Postby scarrier » Thu Sep 18, 2003 9:54 am

Is ther a way to create a Business Partner document
(TCODE BP ->Document tab) from ABAP?

I found the function SKWV_KWUI_DOC_CREATE but there must be an easier starting point?

Thanks
Sylvain
scarrier
 
Posts: 1
Joined: Thu Sep 18, 2003 9:50 am

Try Class CL_CRM_DOCUMENTS

Postby Föß » Wed Oct 01, 2003 7:36 am

Hi!

Try the method create_with_table of the class cl_crm_documents.

Example for ASCII-Data:


...
data: gv_business_object type SIBFLPORB.
data: w_properties type SDOKPROPTY.
data: t_properties like w_properties occurs 0.
data: l_contents TYPE TABLE OF sdokcntasc.

...
...
* Fill l_contens with ASCII-Data (GUI Upload, .... )
...
...
* Link Loio to Business Object
GV_BUSINESS_OBJECT-INSTID = '0123456789'. "<--- Partner Nr
GV_BUSINESS_OBJECT-TYPEID = 'BUS1006'.
GV_BUSINESS_OBJECT-CATID = 'BO'.

w_properties-name = 'DESCRIPTION'.
w_properties-value = 'Example'.
append w_properties to t_properties.

w_properties-name = 'LANGUAGE'.
w_properties-value = 'DE'.
append w_properties to t_properties.

w_properties-name = 'KW_RELATIVE_URL'.
w_properties-value = 'Example'.
append w_properties to t_properties.

CALL METHOD CL_CRM_DOCUMENTS=>CREATE_WITH_TABLE
EXPORTING
BUSINESS_OBJECT = GV_BUSINESS_OBJECT
PROPERTIES = t_properties
FILE_CONTENT_ASCII = l_contents
Föß
 

Re: Create a BP document from ABAP

Postby herensapfan » Thu Jun 03, 2010 8:01 am

Thanks, useful.

2 simple remarks
Nowadays (CRM5.0) one has to use the guid for the variable GV_BUSINESS_OBJECT-INSTID.
Furthermore in case of use OO one has to replace one sentence.
*data: t_properties like w_properties occurs 0.
data: t_properties type table of SDOKPROPTY.
herensapfan
 
Posts: 1
Joined: Thu Jun 03, 2010 6:02 am


Return to CRM :: SAP CRM

Who is online

Users browsing this forum: No registered users and 3 guests





This website is not affiliated with, sponsored by, or approved by SAP AG.