cancel
Showing results for 
Search instead for 
Did you mean: 

How to create hundreds of SHIP TO ADDRESS in SRM 7.0

Former Member
0 Kudos

Hi Experts,

We are configuring SRM7.0 with ECC6 ( Ehp4) having Classic Scenario .

In ECC we are maintaing the Delivery Address at Storage Location level and we have such approx 4000 storage Location Address and so in SRM the Delivery Address in Shopping Cart should be address of the Stoarge Location.

But in SRM 7.0, the attribute ADDR_SHIPT is maintained for the "Internal Buiness Partner : Purchasing Companies".

1. Can anyone suggest, how these large no. of addresses ( i.e. approx 4000) can be created for One Purchasing Company ?

2. By using some BADi, while creating the S/C, is it possible to pull the address of the Storage Location & fill the address in S/C , when this Sto.Loc will be entered ?

3. Is it possible to keep the Delivery address BLANK in the S/C, by NOT maintaing the ADDR_SHIPT at all, so that while creating the Classic PO, system will pick up the delivery address of Sto .Loc in ECC and it will appear in tyhe PO Form ?

Waiting for reply.

Thanks

NAP

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

If you want the Storage location as the address in the SC and the address for these storage location has been maintained in the ECC system following can be done:

1. when replicating the plants from ECC to SRM using BBP_LOCATIONS_GET_ALL all the storage locations will be replciated.

2. In SRM org. structure in PPOMA_BBP udner the extended attributes you have option to add storage locations that can be defaulted in the SC as the address when moved to ECC as a PR or PO.

with regards

Manjunath

Former Member
0 Kudos

Thanks Manujunath,

I am not worried about Storage Location Code. I

am worried about Delivery Address in the S/C and in the Classic PO !!! By selecting/defaulting the Storage location, system will not pick up the address of the Storage Location just like ECC ! . You may be aware that ,iIn SRM, there is no link between Sto. Location( or Plant) Address and the Ship to Party (delivery) address and that is the problem like MM. It came from attribute ADDR_SHIPT.....but I want the logic that will work like ECC.

i.e. Address sgould be Sto Loca code specific.

Can you/anyone suggest on this please.

Thanks

NAP

Former Member
0 Kudos

Hi

If I understand your requirement correctly you are trying to get your storage location as the delivery address on the PO.

For this requirement do not use the ADDR_SHIPT attribute, delete tha address no. maintained in ADDR_SHIPT and then maintain the storage loacation in extended attribute and the storage location is picked in your SC, when this SC is replciated to ECC as PR or PO the storage location is also moved which will pull the storage location address.

with regards

Manjunath

Former Member
0 Kudos

We have left ADDR_SHIPT blank and maintained the storage location in the extended attributes tab. We are finding that when we allow the user 'describe requirement' = creating a shopping cart without reference to a catalog this creates a purchase requisition...then when converting to a PO, the delivery address is not copied from the storage location, but the plant.

So when creating with 'describe requirement' our PR and PO have the delivery address of the plant!

When users create, or order from the catalog and get a PO document right away, the logic works correctly. How do we fix this for a Purchase Requisition?

Former Member
0 Kudos

Thanks Manjunath.

We tried it. We deleted the Attribute ADDR_SHIPT and Delivery address is blank in the SC. Classic PO created from SC in ECCu2026..but in the ECC PO system taking plant address and NOT the Sto. Loc address .

If we create the PO in ECC in ME21N transaction code then system pick up the address of the Storage Location.

Why it is happening ? can anyone suggest the reason and solution for same ?

Thanks

NAP

Former Member
0 Kudos

Hi,

We had the same situation so we wrote a custom program to take out the storage location address and create a internal address in the system.

Former Member
0 Kudos

Thanks dear.

Not getting. It will be very appriciated if you will share with me what you done exactly.

i.e. where you wrote a custom program to take out the storage location address in ECC or SRM ?

In which system you create a internal address, in ECC or SRM ?

Is address is pupolating in the Shopping Cart or not or it is just in the ECC Classic PO?

Thanks in advance

NAP

Former Member
0 Kudos

Hi ,

Any news on this please ?

Regards

NAP

former_member114630
Active Participant
0 Kudos

We are on SRM 7.0 and use storage locations as well. The delivery address on the PO is brought over from the storage location not the plant. I know in the past we had to reapply certain OSS notes. Let me see if I can find those notes and get back to you.

Monique

P.S. Note 984211 - BAPI_REQUISITION_CREATE: Ship-to address is transferred may do the trick. In our previous version of SRM, we had applied note 767461 and this new note fixes that one.

Edited by: Monique Stephens on Apr 28, 2011 8:40 AM

Former Member
0 Kudos

Hi Autobots,

It will be verty appriciated , if you share exactly how you managed to wrote a custom program to take out the storage location address and create a internal address in the system. .

Thanks in advance !

Regards

NAP

Former Member
0 Kudos

Hi Everybody ,

Can anyone helo us on this ? How you guys create huge Delivery Addresses at Company level so that they can get in Shopping Cart in SRM7.0 or/and Classic PO??

It is biggest pain point for me.

Please help us.

Thanks

NAP

Former Member
0 Kudos

Hi,

Sorry for the delay we wrote the program in SRM and when running it will call R/3.

report zebp_address_synch no standard page heading

message-id com_product

line-count 65

line-size 100.

*Include for Data

include zebp_address_synch_top.

*Include for Subroutines

include zebp_address_synch_sub.

----


  • At Selection-screen on value request

----


*at selection-screen on value-request for p_org.

**search help for p_org

  • perform f_search_help.

********************************************************************

*Initialization.

********************************************************************

initialization.

*initialize the parameter with default RFC dest

perform f_get_rfc_dest.

*get the titles in the EBP system from table TSAD3

perform f_get_titles.

*get the all organizational units flagged as companies

perform f_get_is_company.

----


  • At Selection-screen validation

----


at selection-screen.

*Check either the storage location range or the plant range is entered

*on the screen

perform f_validate_input.

********************************************************************

  • START OF SELECTION *

********************************************************************

start-of-selection.

*Check data and get the corresponding company code

  • perform f_check_data.

*check the selection screen values

if p_org is initial.

*check the selection screen values and the get the plant-org relation

perform f_filter_data.

endif.

*If No Error then Proceed

if g_error ne 'X'.

*select data from R/3

perform f_select_data.

endif.

*If No Error then Proceed

if g_error ne 'X'.

*clear workarea

clear: i_plant_wa.

*process one record at a time from i_plant table

loop at i_plant into i_plant_wa.

*Process the data from the internal table

perform f_process_data.

*refresh all internal tables and global vaiables used to store data

  • perform f_refresh_local.

*clear workarea

clear: i_plant_wa.

endloop.

endif.

********************************************************************

  • END OF SELECTION *

********************************************************************

end-of-selection.

*summary of run

perform f_write_summary.

*Transfer Messages to Application Log

perform f_transfer_message.

*Refresh all The Internal tables Used

perform f_refresh_tables.

-


&----


*

*& Include ZEBP_ADDRESS_SYNCH_TOP

&----


tables: hrt5502,hrp1001,bbp_pdorg,bbp_pdbei.

************************************************************************

  • Types *

************************************************************************

types:begin of t_part_addr,

*Fields for Partner and Address Number

************************************************************************

************************************************************************

partner type bu_partner, "Business Partner Number

addrnumber type ad_addrnum, "Address number

************************************************************************

************************************************************************

end of t_part_addr.

types:begin of t_st_addr,

*Fields for Partner and Address Number

************************************************************************

************************************************************************

mandt type sy-mandt, "Client

werks type werks_d, "Plant/Valuation area

lgort type lgort_d, "Storage Location

lfdnr(3) type c, "Sequential address number

addrnumber type ad_addrnum, "Address number

************************************************************************

************************************************************************

end of t_st_addr.

types:begin of t_addr,

*Fields for Partner and Address Number

************************************************************************

************************************************************************

partner type bu_partner, "Partner Number

addrnumber type ad_addrnum, "Address number

adext type bu_adext, "Storage Location

************************************************************************

************************************************************************

end of t_addr.

types:begin of t_org,

*Fields for org unit

************************************************************************

************************************************************************

object_id type pd_objid_r, "Object ID

short_text type short_d, "Object Abbreviation

long_text type stext, "Object Name

comp_code type bukrs, "Company Code

comp_name type butxt, "Name of the company code or company

************************************************************************

************************************************************************

end of t_org.

types:begin of t_org_1,

*Fields for org unit

************************************************************************

************************************************************************

object_id type pd_objid_r, "Object ID

werks type werks_d, "Plant/Valuation area

************************************************************************

************************************************************************

end of t_org_1.

************************************************************************

  • Types *

************************************************************************

types:begin of t_plant,

*Structure for storing plant/valuation area

************************************************************************

************************************************************************

werks type werks_d, "Plant/Valuation area

bukrs type bukrs, "Company Code

************************************************************************

************************************************************************

end of t_plant.

************************************************************************

  • Internal Tables *

************************************************************************

data:

i_part_addr type standard table of t_part_addr initial size 0,

i_st_addr type standard table of t_st_addr initial size 0,

i_addr_ext type standard table of t_addr initial size 0,

i_addr_key type standard table of addr_key initial size 0,

i_adrc type standard table of adrc initial size 0,

i_adr2 type standard table of adr2 initial size 0,

i_adr3 type standard table of adr3 initial size 0,

i_adr6 type standard table of adr6 initial size 0,

i_adrc_1 type standard table of adrc initial size 0,

i_adr2_1 type standard table of adr2 initial size 0,

i_adr3_1 type standard table of adr3 initial size 0,

i_adr6_1 type standard table of adr6 initial size 0,

i_org_unit type standard table of t_org initial size 0,

i_org_stru type standard table of t_org_1 initial size 0,

i_objects type standard table of bapi_objec initial size 0,

i_plant type standard table of t_plant initial size 0,

i_messages type standard table of bapiret2 initial size 0,

i_message_tab type standard table of balmi initial size 0,

i_title type standard table of tsad3 initial size 0.

************************************************************************

  • Work Areas *

************************************************************************

data:

i_part_addr_wa type t_part_addr,

i_st_addr_wa type t_st_addr,

i_addr_ext_wa type t_addr,

i_addr_key_wa type addr_key,

i_adrc_wa type adrc,

i_adr2_wa type adr2,

i_adr3_wa type adr3,

i_adr6_wa type adr6,

i_org_unit_wa type t_org,

i_org_stru_wa type t_org_1,

i_plant_wa type t_plant,

i_messages_wa type bapiret2,

i_message_tab_wa type balmi.

************************************************************************

  • Global Variables *

************************************************************************

data: g_error(1) type c,

g_failed type sy-tabix,

g_exists type sy-tabix,

g_modified type sy-tabix,

g_inserted type sy-tabix,

g_deleted type sy-tabix,

g_comp_code type bukrs,

g_partner type bu_partner.

************************************************************************

  • Constants *

************************************************************************

constants:

c_object type balhdr-object value 'SRM',

c_subobject type balhdr-subobject value 'ZST_SYNC',

c_msgid type sy-msgid value 'COM_PRODUCT',

c_i type sy-msgty value 'I',

c_e type sy-msgty value 'E',

c_w type sy-msgty value 'W',

c_num type sy-msgno value '898',

c_otype type swhactor-otype value 'O',

c_cocode type om_attrib value 'COCODE',

c_207 type hrp1001-relat value '207'.

  • c_as type bbp_det_account-acc_cat value 'AS',

  • c_v type bbp_det_account-acc_cat value 'V',

  • c_j type bbp_det_account-acc_cat value 'J'.

----


  • Selection Screen

----


selection-screen begin of block b5 with frame title text-001.

selection-screen begin of block b1 with frame title text-0s1.

*Plant

select-options: s_plant for bbp_pdbei-be_plant no-extension obligatory.

*Storage Location

select-options: s_sloc for hrt5502-storage_loc no-extension obligatory.

selection-screen end of block b1.

selection-screen begin of block b3 with frame title text-0s3.

selection-screen begin of block b3b with frame title text-0s4.

*Organization Unit

*select-options: s_org for hrp1001-objid no intervals no-extension.

*Organization Unit

parameters: p_org type hrp1001-objid no-display.

selection-screen end of block b3b.

selection-screen end of block b3.

selection-screen end of block b5.

selection-screen begin of block b4 with frame title text-002.

*RFC Destination

parameters: p_rfc type bbp_backend_dest-dest obligatory.

selection-screen end of block b4.

Former Member
0 Kudos

Thanks. Helpful!.

But from thecode we are unable to get anything....

It will be very appricated , if yiu can suggest what logic you are using with which which FM, BADi..etc ?

Thanks in advance

NAP

0 Kudos

create partners by replicating adrc table

Former Member
0 Kudos

Thanks Rama.

Issue resolved !!! This was our biggest pain and this solution is fantastic and great achievment for us.

Former Member
0 Kudos

Hi NAP,

Can you please share the solution for creating delivery addresses programatically in SRM 7.

Answers (0)