cancel
Showing results for 
Search instead for 
Did you mean: 

Need to pass email field(SMTP_ADDR)while creating the vendor using CREMAS

Former Member
0 Kudos

Hi All,

i am creating the vendors by IDOC by using CREMAS basic type CREMAS05.

There is no email field in any of the idoc segments,as i need to pass the email address being mandatory,

i created the Z segment and added the email field into it and then created the z extension and added this zsegment into the extension.

Now how do i and where do i map this field so that email data is also passed while creating the vendor master.

i have debugged the cremas Function Module IDOC_INPUT_CREDITOR and the data is getting passed segment wise,and for customer segement i.e for the zsegment there is a enhancement section where i need to pass this field,but i do not know how do i map this field and with what structure.

Please let me know how do i handel this/or is there in other way to do it.

Thanks.

RJP.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Rohan,

as written in your other threads that deals with the same topic.

This is really the worst solution you can decide to take.

You will easily face a lot of bad surprises, inconsistencies, ...

Maybe you have good reason and no solution, in that case I would suggest that you forget the on screen maintenance. So no BAdI implemation in CUSTOMER_ADD_DATA_CS or VENDOR_ADD_DATA_CS.

In the FILL_FT_TABLE_USING_DATA_ROWS method, try to update the address data of your vendor or customer IN UPDATE TASK.

Doing this, you might succeed to save the email before the call transaction XK02 is running.

Good luck as this is not so sure. Use the standard function modules of address management to do so.

If the vendor does not exists yet, this will be more tricky.

Best regards

Alain

Just for other reading peoples, a copy again my initial reply

Hi,

the email is part of the address data. It is therefore not belonging to the customer/vendor master data. So it is also not part of the DEBMAS/CREMAS idoctype.

To distribute via ALE accurate customer address data, you need to distribute ADRMAS idoctypes too.

See [note 384462|https://service.sap.com/sap/support/notes/384462] and [note 306275|https://service.sap.com/sap/support/notes/306275]

BR

Alain

Former Member
0 Kudos

Hi,

Alain

Thanks a lot of your great help,my problem is solved now.inside the method FILL_FT_TABLE_USING_DATA_ROWS

in the BDCDATA internal table i passed the FNAM and FVAL for the email address field name,thats all i did i now the email id is getting along with the vendor master data.i dint use any other FM'S nothing apart from this .

thanks again for the clue..

Thanks.

Rohan Patil.

Former Member
0 Kudos

Hi Rohan

yes this is true you can do so.

However, I do not encourage you too much in that direction. For the email, I guess no trouble would ocurs as this field is not at all present in the LFA1 table.

But for other address fields that are part of LFA1 AND ADR* tables, you might face quite nice inconsistencies afterwards.

BR

Alain

Former Member
0 Kudos

Check for the user exit of the idoc function module. You can check for - EXIT_SAPLKD02_001 & include - zxvsvu04.

or

EXIT_SAPLKD01_001

you have to write logic

see the example code

DATA: WA_ZE1EDP01 TYPE ZE1EDP01.

if int_edidd-segnam = 'ZE1EDP01'.

move int_edidd-sdata to WA_ZE1EDP01.

WA_ZE1EDP01-ZTEST = 'Test'.

move WA_ZE1EDP01 to int_edidd-sdata.

endif.

Former Member
0 Kudos

Hi,

I have a badi to do the job..the badi can pass the non standard segment,i have implemented that badi, and i am gettng the zsegment name and the sdata there.

the badi is VENDOR_ADD_DATA_BI and the method in which i am gettng the segment and the sdata is PASS_NON_STANDARD_SEGMENT.

My question now is how do i pass this data on to the screen i.e. on to the Email Address field in xk01 transaction.i mean i need to maap it..where and how can i map it,what are the mapping fields/structure.

Thanks,

RJP.