on 10-29-2014 2:04 PM
Hi everyone,
I need to create a program for mass creation of Prod. specific means of transport, for already existing transportation lanes.
I want to know whether this can be done using any of the below 2 BAPIs:
BAPI_TRLSRVAPS_SAVEMULTI
BAPI_TRLSRVAPS_SAVEMULTI2
If yes, then it would be great if anyone could guide me with all the parameters that I need to pass in this BAPI.
If no, then how can this be done easily, for mass creation.
Many thanks,
Bhuvan Paliwal
Hello Bhuvan,
Step 1: Execute Transaction /N/SAPAPO/SCC_TL1, and enter details as required
Step 2: Click on Create New button
Step 3: Select radio button for Mass Selection and then Tab Mass Se
Step 4: Enter all products for which Transportation Lane to be maintained here and click execute below. Then again select all products in the next pop up and click continue.
Step 5: Give Start Date and End Date as Validity and then click Continue.
Step 6: Select the MOT XXXX Line and then click on Product-Specific Means of Transport and then Click on Create.
Step 7: Click New and then select the radio button Copy all Existing Products and then Copy, Click Ok on the information pop up and then Click on Copy and Close.
Let me know if you need more information.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Bhuvan,
Try the below code. I have tried and it worked for me.
* Update/create product specific means of transport
CALL FUNCTION 'BAPI_TRLSRVAPS_SAVEMULTI'
EXPORTING
logical_system = lf_rfc
model = lf_model
commit_control = 'E'
auto_delete = ''
TABLES
prod_means_of_transport = lt_prod_means_of_transport
prod_means_of_transportx = lt_prod_means_of_transportx
return = lt_return.
logical system --> RFC connection
model --> Material
commit control --> blank or E or A (if blank then COMMIT won't done automatically, if E COMMIT is done automatically and rollback will be done in case of error message, if A COMMIT is done automatically and rollback will be done in case of abort message)
auto_delete --> leave it as blank, this is for deleting the existing transportation lane
Fill the below fields for prod_means_of_transport and prod_means_of_transportx.
location_from
loctype_loc_from
location_to
loctype_loc_to
product
ttype_valfr
ttype_valto
ttype
product_valfr
product_valto
lot_size_profile
Regards,
Thanga
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bhuvan,
If it was helpful for you please validate the right answers. So, the others consultant can benefit!
Thanks.
Regards, Marius
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You can mass upload materials directly in /SAPAPO/SCC_TL1. You can copy and paste a list of materials in seconds.
In case you need to write a program, in this blog you have a sample code:
data : lt_PRODUCT_PROCUREMENT TYPE TABLE OF BAPI11201TRPRODLANE2,
lw_PRODUCT_PROCUREMENT TYPE BAPI11201TRPRODLANE2.
data : lt_PRODUCT_PROCUREMENTx TYPE TABLE OF BAPI11201TRPRODLANE2,
lw_PRODUCT_PROCUREMENTx TYPE BAPI11201TRPRODLANE2.
LOOP AT gt_final into gw_final.
lw_PRODUCT_PROCUREMENT-MODEL = '000'.
lw_PRODUCT_PROCUREMENT-LOCATION_FROM = gw_final-LOCNOFR.
lw_PRODUCT_PROCUREMENT-LOCATION_TO = gw_final-LOCNOTO.
lw_PRODUCT_PROCUREMENT-PRODUCT = gw_final-MATNR.
lw_PRODUCT_PROCUREMENT-DISTRIBUTION_PRIORITY = gw_final-DPRIO.
APPEND lw_PRODUCT_PROCUREMENT to lt_PRODUCT_PROCUREMENT.
CLEAR : lw_PRODUCT_PROCUREMENT.
lw_PRODUCT_PROCUREMENTx-MODEL = '000'.
lw_PRODUCT_PROCUREMENTx-LOCATION_FROM = gw_final-LOCNOFR.
lw_PRODUCT_PROCUREMENTx-LOCATION_TO = gw_final-LOCNOTO.
lw_PRODUCT_PROCUREMENTx-PRODUCT = gw_final-MATNR.
lw_PRODUCT_PROCUREMENTx-DISTRIBUTION_PRIORITY = 'X'.
APPEND lw_PRODUCT_PROCUREMENTx to lt_PRODUCT_PROCUREMENTx.
CLEAR : lw_PRODUCT_PROCUREMENTx.
ENDLOOP.
CALL FUNCTION 'BAPI_TRLSRVAPS_SAVEMULTI2'
EXPORTING
LOGICAL_SYSTEM = GW_LOGSYS
BUSINESS_SYSTEM_GROUP = GW_BSGGROUP
TABLES
PRODUCT_PROCUREMENT = lt_PRODUCT_PROCUREMENT
PRODUCT_PROCUREMENT_X = lt_PRODUCT_PROCUREMENTx
RETURN = gT_RETURN.
READ TABLE gT_RETURN into gw_RETURN with key type = 'E'.
IF sy-subrc <> 0.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.
ENDIF.
Kind Regards,
Mariano
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mariano,
He needs a solution for product specific means of transport not for prod.specific transportation lane!
However in the product specific means of transport you have the possibility to choose Copy all Existing Products. So, I imagine that all products that are specific transportation lanes will be copied.
Thanks.
Regards, Marius
Thanks for your replies Marius, Mariano.
I'm trying to get the BAPI to work in test mode (SE37).
I'm entering To and From Location and Product in tables PROD_PROC_MEANS_OF_TRANSPORT and PROD_PROC_MEANS_OF_TRANSPORT_X.
But it is not working. Gives an error saying "No valid Location could be found".
I debugged a little and found that the internal GUIDs for Locations and Product are not getting assigned. But I can't find a field to pass these GUIDs to the BAPI.
Best Regards,
Bhuvan Paliwal
Hi,
You can do this with the program FUNCTION_LOADER_INLAY.
Enter a file name then in the Design tab enter your BAPI as name of put function model and press enter. From parameters name list you select logical name, business system group, etc.. and you transfer them on the right side. Then you click Format Worksheet to generate excel file. In the excel file you put the parameters values and then to load data in the system you press button SAP System.
Thanks.
Regards, Marius
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
6 | |
4 | |
3 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.