cancel
Showing results for 
Search instead for 
Did you mean: 

Help with replicating/updating vendor master data

Former Member
0 Kudos

Hi,

Currently, we run the bbp_vendor_sync program to do the replication. It does the job of both bbpgetvd (new vendor creation) and bbpupdvd (update existing vendor).

But the problem is, we have two number ranges for vendors. One is Numeric and other one is Alpha.

Group -->AB From 0010000000 to 0699999999

Group -->AZ From A to ZZZZZZZZZZ

The vendor synchronization program can consider only one number range at a time i.e.

either Numeric or Alpha. So, we have to switch the active number range

and run the program twice., first for numeric and then for alpha.

In order to avoid this, I'm looking at implementing bbp_transdata_prep which I was told would take care of this issue.

I looked around for documentation/sample code for bbp_transdata badi and couldnt find any on SAP help site or SDN.

Wondering if someone can help with the documentation/sample code and difficuly level of implementing this BADI.

Any help would be highly appreciated and suitable points would be awarded for your help.

Also, if there is another way to solve this issue without implementing transdata badi, pls. let me know.

TIA,

Seyed

Accepted Solutions (0)

Answers (7)

Answers (7)

Former Member
0 Kudos

Hi Laurent,

I have already thought about it, indeed this would be the way to do it. But in my case I cannot because in my system is setup as follows:

1.- Internal number range from 10000 to 19999

2.- External number range from 20000 to 29999

3.- Internal number range from 30000 to 39999

4.- Externam number range from T0000 to T9999

As you can see I can not merge the group 2 and 4.

I think I have collected all the information I need,

Thanks for your feedback,

Good weekend.

Aaron

Former Member
0 Kudos

Ups,

That was me...

I think i used the user of a collegue...

laurent_burtaire
Active Contributor
0 Kudos

Hello Aaron,

Define only one vendor range number being external.

This range will be alpha-numeric: beginning from 1111111111 to ZZZZZZZZZZ (not sure for the number bracket: you will have to check it by making some tests).

Then, using BBP_VENDOR_SYNC report and if you don't want to replicate all R/3 vendors making part of the number bracket defined for your vendor range number, implement methods from BAdI BBP_TRANSDATA_PREP in order to delete unwanted vendors during SRM creation/update process.

Regards.

Laurent.

Former Member
0 Kudos

Hello!

Thanks Laurent for your quick reaction.

Program BBP_VENDOR_UPDATE_DATA_JOB does not create vendors, it only updates changes in existing vendors. There is no restriction for the number range, all vendors are considered, but it does not create new vendors.

I would need program BBP_VENDOR_GET_DATA_JOB instead, which creates new vendors, but in this case the restriction with the number range is again present. With this program my second external number range is ignored.

It seems that SAP has delivered BBP_VENDOR_SYNC to substitute the previous two programs. BBP_VENDOR_SYNC creates and updates vendors, but in case of the creation it has the same restriction with the external number range. I wonder why they did it like this.

Well, I see two options. To modify BBP_VENDOR_SYNC or to modify BBP_VENDOR_GET_DATA_JOB.

Any suggestions?

Regards,

Aaron

Former Member
0 Kudos

Hey,

Thanks for your feedback.

In table TB001 is defined which number range is going to be syncronized, only one external number range can be selected.

It is not only schedule the program twice. You have to change the customizing in between.

Would you consider this as an option? change this settings via a Z program scheduled in a job?

Regards,

Aaron

laurent_burtaire
Active Contributor
0 Kudos

Hi Aaron,

And what about scheduling also report BBP_VENDOR_UPDATE_DATA_JOB for second external number range ?

Regards.

Laurent.

Former Member
0 Kudos

Hi,

I am dealing right now with the same problem. I dont see how BADI BBP_TRANSDATA_PREP can help with it. I have implemented it and when I run the program BBP_VENDOR_SYNC the BADI does not stop.

Anyways, I see in the code of program BBP_VENDOR_SYNC that only one number range is considered. There is a SELECT SINGLE to the NRIV and everything out of this range is deleted. I dont thing a BADI can avoid this.

Any suggestion? something better than a modification in the standard program?

Many thanks in advance,

Aaron

laurent_burtaire
Active Contributor
0 Kudos

Hello Aaron,

What is the problem to not schedule report BBP_VENDOR_SYNC twice (once for each vendor number range) ?

Regards.

Laurent.

Former Member
0 Kudos

Seyed,

We have the same situation that you describe with the different vendor number ranges and doing only one at a time via the SYN program. Were you able to solve your issue with the BBP_TRANSDATA_PREP BADI? If yes, how did you specify the different ranges to check. I can see where you can change the data being returned from the backend with this BADI but not how to check different ranges. If this wasn't the BAID to solve your issue, how did you solve it?

Thanks,

Russell

Former Member
0 Kudos

Hi

<u>Please go through this -></u>

http://help.sap.com/saphelp_srm50/helpdata/en/56/54f137a5e6740ae10000009b38f8cf/frameset.htm

http://help.sap.com/saphelp_srm50/helpdata/en/62/fb7d3cb7f58910e10000000a114084/frameset.htm

http://help.sap.com/saphelp_srm50/helpdata/en/42/d3b671ba67136fe10000000a1553f7/frameset.htm

http://help.sap.com/saphelp_srm50/helpdata/en/bb/6c0e3b02616a42e10000000a11402f/frameset.htm

<b><u>Sample BADI Implementation

BADI Definition - BBP_TRANSDATA_PREP

Purpose -> Impl. for BBP_TRANSDATA_PREP, Delete Invalid Mail Addresses</u></b>

<u>PREPARE_REPLICATION_DATA method -></u>

method IF_EX_BBP_TRANSDATA_PREP~PREPARE_REPLICATION_DATA.
  FIELD-SYMBOLS: <LFS_ADR6> TYPE ADR6.
  LOOP AT CT_ADR6 ASSIGNING <LFS_ADR6>.
    IF <LFS_ADR6>-SMTP_ADDR NS '@'.
      DELETE CT_ADR6.
    ENDIF.
  ENDLOOP.
endmethod.

<u>PREPARE_UPDATE_DATA method -></u>

*--------------------*
method IF_EX_BBP_TRANSDATA_PREP~PREPARE_UPDATE_DATA.
  FIELD-SYMBOLS: <LFS_ADR6> TYPE ADR6.
  LOOP AT CT_ADR6 ASSIGNING <LFS_ADR6>.
    IF <LFS_ADR6>-SMTP_ADDR NS '@'.
      DELETE CT_ADR6.
    ENDIF.
  ENDLOOP.
endmethod.
*----------------*

Hope this will help.

Regards

- Atul

Former Member
0 Kudos

Hi Atul,

Thanks for your reply.

I already went through couple of links that you provided. I couldnt find anything about BBP_TRANSDATA_PREP BADI although there are details about bbgetvd, bbpupdvd and bbp_vendor_sync..

Also, I implemented BBP_TRANSDATA_PREP and activated those two methods. ( no coding there except a debug routine that runs an indefinite loop)

When I ran the bbp_vendor_sync, I found that the processing stopped at the infinite loop in the BADI and the parameter ct_lfa1 is populated with the vendor data extracted from R/3.

So, now I can see that BADI is being triggered from BBP_VENDOR_SYNC and parameter ct_lfa1 is being passed the extracted data and the method "PREPARE_UPDATE_DATA" is being called.

Now my issue is I've to manipulate the two number ranges and ensure vendors from both the number ranges gets transferred ( although only one is set as active/default external number range in SPRO)

Thanks,

Seyed