SAP for Retail Discussions
Join conversations about personalization, omnichannel strategies, and operational excellence in retail using SAP for Retail software.
cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to load multiple store data using BAPI /POSDW/BAPI_POSTR_CREATE

Former Member
0 Kudos

Hi Experts,

I have a requirement to load multiple store and multiple business date data in POS DW.

But, BAPI /POSDW/BAPI_POSTR_CREATE allows to upload only single store data, and fails if we give multiple store data in input.

I tried copying the BAPI into a custom one and modifiying the codes and checks, but no help!

Is there any other way of uploading this data?

- Narsingh

1 ACCEPTED SOLUTION

amit_tunara
Active Contributor
0 Kudos

Hi,

The same can be achieved by a middleware or a customized program. You have to take help of an ABAPer and follow the given logic:

  • Initially all the stores data is to be taken into an Internet table.
  • From this Internal table take data of one store and one business date and fill internal BAPI tables, call BAPI /POSDW/BAPI_POSTR_CREATE to fill this data.
  • The BAPI call is to be kept in a loop and number iterations depends on number of business date and store combination.

We had done through an ABAP program and with XI interface too.

Let me know if you need any further info.

Regards,

Amit

View solution in original post

10 REPLIES 10

amit_tunara
Active Contributor
0 Kudos

Hi,

The same can be achieved by a middleware or a customized program. You have to take help of an ABAPer and follow the given logic:

  • Initially all the stores data is to be taken into an Internet table.
  • From this Internal table take data of one store and one business date and fill internal BAPI tables, call BAPI /POSDW/BAPI_POSTR_CREATE to fill this data.
  • The BAPI call is to be kept in a loop and number iterations depends on number of business date and store combination.

We had done through an ABAP program and with XI interface too.

Let me know if you need any further info.

Regards,

Amit

0 Kudos

Hi Amit,

Thanks for the suggestion.

I am also follwoing the same approach.

As I am not able to build a logic to differentiate data based on storeid, I am bound to run the BAPI for "N" times for "N" records!!.. It consumes quite lot of time.

Could you please help me with any code chunk?

0 Kudos

Hi,

How come the sales data is not having the store id? Is there any uniqueness in that data... unless unique store id and transaction date how will you separate it? All the codes for this standard BAPI will have STORE ID as one of the mandatory field in BAPI tables.

Kindly provide more information on the POS data you are receiving from Stores?

Regards,

Amit

0 Kudos

Hi Amit,

Yes, I do have the store ID.

But, I need to bifurcate the loop based on different storeids or diffrerent dates of same store id. This is where I am stuck.

I am entangled in loops and trying to find a suitable logic for the loop passes.

0 Kudos

Hi,

The Loop should be kept on the combination of Store ID and transaction date. If you have this data in csv file or text format, you can extract the Store ID and transaction date by string functions. You may have to talk to your POS guy to understand his file structure and position of data.

You can put the Loop on the main internal table where you have POS Data. Then used AT NEW syntax to bifurcate the processing for each store and date. I am giving the logic on very simple language which your ABAPer will understand.

Loop At it_POS_Data

    At New StoreID and Transaction date         

           Fill all BAPI Tables

    End At

     Call BAPI to Post the data

End Loop

If there are multiple transactions under a same store and date, put another loop inside the AT clause.

Regarding BAPI tables which are to be filled you can also refer to a thread

http://scn.sap.com/message/14367635

Let me know if you need any other help.

Regards,

Amit

0 Kudos

Dear Amit,

We have tried to post the transactions using BAPI - /POSDW/BAPI_POSTR_CREATE from the abap program. I didn't receive any return message back.

If I will test in SE37, what should I fill in RFC target system ? And do I need to do any pre-configuration to achieve it. We are trying to create IDOC from abap program manually.

Could you please advise me ? Thanks in advance.

Best Regards,

July

0 Kudos

Try with <SID of POS DM / BW system>CLNT<Client Number>

0 Kudos

Dear Vikrant,

I have a question about BAPI /POSDW/BAPI_POSTR_CREATE. After the bapi is executed successfully, still do we need to aggregate with tcode - pdis or how we can get IDoc directly from the abap without doing any manual process ?

Now I can monitor the pos transactions in mon0.

Regards,

July

0 Kudos

Depends on how your tasks are configured.

If those are set to immediate processing tasks will execute as soon as transaction is successfully posted in workbench.

Also if it is one step processing no need to run any report further to generate IDoc if tasks are set to immediate. In case of two step processing you need to run outbound dispatcher.

Thanks,

Vikrant.

0 Kudos

Dear Vikrant,

Thanks for your quick reply and explanation.

Regards,

July