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

BAPI Questions about creating new DIRs

Former Member
0 Likes
658

1. I'm using BAPI_DOCUMENT_CREATE2 to create new DIRs for a document type Z03. However, when I try to use the same BAPI to create new versions for existing DIRs for this same document type I get the error E26 014 "Document type Z03 can only assigned numbers internally". I assume due to our Z03 configuration I will have to use BAPI_DOCUMENT_CREATENEWVRS2 to create a new version for an existing DIR, correct?

2. How do I use BAPI_DOCUMENT_CREATE2 to create long text for the Description field (Document Data tab)? I'm trying to use the tables parameter LONGTEXTS but I'm obviously missing something.

We're on R/3 4.7.

Thanks,

Brad

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Likes

Thanks for the response.

1. Note 1018184 isn't applicable in our system per SNOTE.

2. I've already tried setting the long text indicator (TEXTINDICATOR field on table parameter DOCUMENTDESCRIPTIONS) add populating the table parameter LONGTEXTS but that doesn't seem to do anything.

Regards,

Brad

Former Member
0 Likes

The first line of the longtext is the document description.

You must pass the document description as the first tabel entry in the table longtext and the first line of your longtext as the second entry.

regards Iring

Answers (1)

Answers (1)

Former Member
0 Likes

1. BAPI_DOCUMENT_CREATE2 should also work for creation of new version. Check if u have versioning on or not for Z01. Probably note "1018184" should help u.

BAPI_DOCUMENT_CREATENEWVRS2 is lso a gud option if u want to copy some data from previous version of DIR.

2. u need to set "X" for usage of long text assignment in the BAPI.

Points Appreciated.

Manish_PLM
Discoverer
0 Likes

I have the same issue, works fine for new DIR version creation when executed by se37 but gives error when made RFC call. Returns error as "Document type XXX can only be assigned numbers internally". Please suggest how did you solve.