Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

IDoc for Creating Vendor and its address

Former Member
0 Kudos
2,763

Hello,

MY scenario, i'll be getting vendor details from a third party system (ESP), via PI.

ESP will send an SOAP Message and SAP PI will convert it into IDoc for SAP R/3 System.

The ESP system will send Vendor Details along with its address, i know CREMAS is for Vendor and ADRMAS is for address, but this is split in PI, when the sending system is sending an IDoc CREMDM, correct me if i am wrong.

So my question is there any Idoc which will help me create Vendor along with its Address detail, or do i have create a custom Idoc for this.

Second Question, I need to send a mail if the Idoc fails in the system and if successfully updated, a mail triggered saying vendor created. any help would be appreciated

Regards,

Abhishek

1 ACCEPTED SOLUTION

Former Member
0 Kudos
850

In all CREMAS01 to CREMAS05 IDoc types the main segment E1LFA1M has all address fields. You need not use separate IDoc for address.

You can use IDoc with workflow to send automatic emails when IDoc fails. Search for these.

27 REPLIES 27

Harsh_Bansal
Contributor
0 Kudos
850

Hi Abhishek,

I think there is no existing idoc with both these segments.

You will have to extend the CREMAS idoc to add the address segment in it.

And for mail you can read the status of the idoc in the inbound Function Module

and send that status message in text of mail using the FM -

SO_DOCUMENT_SEND_API1

Regards,

Harsh Bansal

0 Kudos
850

Hello,

How difficult is to extend an CREMAS IDoc, any document for the same would be appreciated.

For sending mail to external system, is there any configuration that needs to be done.

Regards,

Abhishek

0 Kudos
850

search sdn you will find many

Nabheet

nabheetscn
Active Contributor
0 Kudos
850

Another idea can be..you can post second idoc from first idoc function module if it runs sucessfully...but easy way will be to extend your idoc. You can write code to send emial in your FM

Nabheet

Harsh_Bansal
Contributor
0 Kudos
850

No it is not difficult to extend the idoc. Just search how to extend the idoc..you will get many answers...

And regarding mail..just search with the FM i provided..you will get many sample codes..just replace data in them and you are done..Otherwise let me know i will help you..

Regards,

Harsh Bansal

Former Member
0 Kudos
851

In all CREMAS01 to CREMAS05 IDoc types the main segment E1LFA1M has all address fields. You need not use separate IDoc for address.

You can use IDoc with workflow to send automatic emails when IDoc fails. Search for these.

JL23
Active Contributor
0 Kudos
850

CREMAS is an old IDOC which is supposed to create vendors, like a vendor was before central address managment was implemented with release 4.x

CREMAS has the same address fields as LFA1 table has.

But this small address portion is not sufficient anymore for all countries and their address needs, hence SAP came upwith central address management, where the address is stored in ADRC table.

when you execute XK01 for vendor maintenance, then you see the embedded central address screen.

if you record XK01, and forget to flag the box for central address management in the initial screen, then you have the chance to see the old address screen, how it was in release 3.1.

All the address fields from LFA1 are just redundand to ADRC, but ADRC has more fields. This redundancy is important, because many reports did not need to be rewritten.

Please see OSS notes 306275 and 384462 for more information.

doesn't extending of an IDOC mean that you have to extend the coding for IDOC processing as well?

Why dont you serialize CREMAS and ADRMAS IDOCs ? so you always have them together?

0 Kudos
850

Hello,

As far as i know, the sender system needs to send CREMDM, and PI splits this Idoc into CREMAS and ADRMAS.

But by sending system is an Non SAP system which will communicate via PI with SOAP Adapters.

So my question is whether do we have standard idoc available for Vendor Master Creation and Address Maintainence, if not do i develop a custom Idoc for the same using BDC or any other method is which is better than BDC

any BAPI or function module available, for creating a vendor and its address, no problem if two function module for vendor and address.

Regards,

Abhishek

JL23
Active Contributor
0 Kudos
850

what problems do you have with 2 separate IDOCs for vendor and its address?

I do not know any BAPI for vendors, but there is one for addresses.

0 Kudos
850

Hello,

I dont have any problem, as far as i know, you cant trigger ADRMAS, directly.

This has to triggered by sender system via CREMDM or DEBMDM, which PI splits into CREMASADRMAS and DEBMASADRMAS.

But my sender is an Non-SAP System, which will communicate via PI using SOAP Adapter, so need to figure out how do i created and updated the Vendor details along with its address

Regards,

Abhishek

0 Kudos
850

Hello,

I have done the configuration for CREMAS and ADRMAS, but the system is not updating the vendor, ADRMAS Passes successfully, but CREMAS fails, with status 51: Application Document not posted.

And when i process the CREMAS IDoc, using WE19, i dont get an error, and it updated successfully.

Any help would be appreciated.

Regards,
Abhishek

JL23
Active Contributor
0 Kudos
850

What error is listed when you have the status 51 for CREMAS?

0 Kudos
850

Hello,

We donot get any error, we just say application document not posted.

Please the screen shot. We are using CREMAS and ADRMAS, and in PI we have set Maintain Order at run time, so that ADRMAS is posted first and then CREMAS, but we havent set any serialization for inbound processing.

So CREMAS is failing without any error

Regards,

Abhishek

JL23
Active Contributor
0 Kudos
850

What do you get if you double click this docu icon in front of 51?

0 Kudos
850

Hello,

We do not get any error please see attached screen shot for the same

The strange thing is ADRMAS is successfully posted but the ADRC Tables in not updated, where as CREMAS fails without any error.

Any help would be appreciated

Regards,

Abhishek

JL23
Active Contributor
0 Kudos
850

If I intrepret the data in E1LFA1M segment correct, then you do not even have a vendor number in your idoc.

0 Kudos
850

Hello,

Vendor number are defined as Internal Number, so Vendor number is automatically be generate in a sequence.

Regards,

Abhishek

JL23
Active Contributor
0 Kudos
850

Abhishek Biwal wrote:

Hello,

Vendor number are defined as Internal Number, so Vendor number is automatically be generate in a sequence.

Regards,

Abhishek

Sorry, but this is not correct. this may be true for batch inputs, but not for IDOCs. In case of Idocs you have to have the vendor number already in the IDOC.

There is a function module NUMBER_GET_NEXT to pull the next number from internal number range.

0 Kudos
850

Hello,

We are using the standard IDoc CREMAS04 with Message Type CREMAS, and process code CRE1 and associate function module IDOC_INPUT_CREDITOR, which according to me use batch input, correct me if i am wrong. So i need not bother regarding the next number in sequence.

I guess we are moving away from the issue, i CREMAS04 is failing without giving any error message.

Regards,

Abhishek

JL23
Active Contributor
0 Kudos
850

I load already since 2005 vendors with IDOC method, I just loaded 980 today, and I very certain that you have to have the vendor number in the IDOC.

Maybe I am wrong, but had you already posted an CREMAS Idoc succesfully where SAP itself created  the vendor with the internal number?

I can only recommend to  try it, but it is up to you.....

0 Kudos
850

Hello,

As far as i know, in every project that i have done, we have used idoc's and all are internal number range, so never specified the Vendor Number, it was always generated but the system and through change pointers send out of SAP to updated in the sender system.

But thats not the point, the issue at hand is my IDOc is failing with status 51 but its updating the Vendor master tables where as ADRMAS is successful with status 53 but not updating the ADRC table

Regards,

Abhishek

JL23
Active Contributor
0 Kudos
850

I'd like to apologize, I just tested it without vendor number, and it posted succesfully.

(I cant use this way, as I immediatly need a cross reference table, which I can get directly from LSMW when using this FM to preassign the internal number)

I'd really like to help you further, but had never seen a situation like yours.

0 Kudos
850

Hello,

No need to apologize, we are here to learn.

Have, raised it with SAP, let see how they proceed.

Regards,

Abhishek

0 Kudos
850

Hi Abhishek,

Did you solved this error or got any help from SAP?

I have got a same requirement where am getting Vendor Details using PI from third party system(Oracle)  and In PI am using ADRMAS03 and CREMAS04 Idocs to populate the address and vendor details into SAP tables in R3 system.

For me also ADRMAS posting successfully and CREMAS got stuck with error.

0 Kudos
850

Hello,

The system had custom code developed for a custom Business AddIn for some other project, in that code, they used commit work statement which caused a erroneous results.

Just some information which i found while using central address maintenance, is that the vendor number should be supplied from the 3rd party system, then only the Idoc ADRMAS, CREMAS will update the address details else it wont work

Regards,

Abhishek

0 Kudos
850

I think you have some problems with the relations between ADRC and LFA1.

ADRMAS needs the vendornumber and the vendor needs the ADRC Number.

I prefer to debug the BAPI which is processing the ADRMAS IDoc.

Can you post some sceenshots with the headersegments of ADRMAS and CREMAS ?

0 Kudos
850

i found another missing information.

You need to have the field "MSGFN" filled !

This is needed to identify "is it a change or deltetion or full-load ..."

Try to fill this field E1LF**M-MSGFN = 018

give it a try