Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

A question about BDC for KP26

former_member202733
Participant
0 Kudos

Hi guys, how are you?

I had to do an BDC for KP26 in order to do a mass load through an excel file, and I know that BDC is not the better solution here, but I'm trying to figure it out how the BAPI_ACT_PRICE_CHECK_AND_POST works, so meanwhile I have to use the BDC approach.

The BDC works fine in my laptop and works fine in other laptops but in a few it don't. When some user executes the program, he gots the mesage that the batch input data for dynpro SAPLKPP0 1000 does not exists.

I thought, maybe it's could be some roles or profile problem, but there is nothing in SU53 and the user runs the program in my laptot using his credentials and the program works fine.

So there is something wieard here, because, I thought it could be a version of SAP GUI, but its not the case, those laptops in that the program won't work has the same SP level than mine.

Have you ever seen something like this happen, either with this transaction or with another?

I appreciate any help.

Best regards,

Ronaldo S. Vieira

13 REPLIES 13

raymond_giuseppi
Active Contributor
0 Kudos

You could first try to execute BAPI_ACT_PRICE_READ to read current values then change some values and call BAPI_ACT_PRICE_CHECK_AND_POST with the modified values.

0 Kudos

That is a good idea, but I'm trying whitout succes. It's looks like I have to fill other structures than HEADER_INFO.

The HEADER_INFO structure do not provide the same parameters of the first screen of KP26 transaction, so I'm trying to figure it out what is missing here.

Thansk and regards.

Ronaldo S. Vieira

0 Kudos

Subfields of header_info parameter are not hard to guess (co area, year, period, version, currency type should be the requested ones) for you first try I suggest you pass period_from = period_to, easier to check.

former_member182550
Active Contributor
0 Kudos

Screen size, or resolution ? Can cause problems with the number of rows displayed in table controls ?

Rich

Sandra_Rossi
Active Contributor
0 Kudos

"Something happens like this" yes all the time with BDC ! Because the sequence of dynpros may vary based on the values entered. All you have to do is to determine which are those values so that you can reproduce (ask the Excel file!)

Note that the batch input sessions (BDC_OPEN_GROUP, SM35 and so on) used to help troubleshooting that kind of issue because the principle is to store the values in a "session" table then execute it, but if you just do CALL TRANSACTION ... USING ..., then the values are not logged.

jlivio90
Active Participant
0 Kudos

Hi Ronaldo.

The product you are working with, is it ECC or S/4?

If this is S/4, have you considered work with Migration Cockpit? There is a migration object already predefined by SAP to migrate the activity types.

Let me know if this is S/4, then I can guide you through Migration Cockpit.

0 Kudos

Hi Jaderson, thanks for the answer.

The product here is S/4.

Actually before I enter the development team they was cosidering use this migration object but for some reason that I don't know, the client here do not want this approach and instead the client wants a Z program that performs a BDC or executes a BAPI.

Best regards,

Ronaldo S. Vieira

0 Kudos

ronaldo.silveiravieria you could quickly see what the migration cockpit is, by searching the web and trying it, what are its advantages and drawbacks, and if it has advantages and correspond to the client requirements, then ask your client if there is a reason to limit to BDC or pure BAPI, and propose the migration cockpit instead.

former_member202733
Participant
0 Kudos

Hi Sandra, thaks for your answer.

Actually, I am curious about your answer.

First of all, I don't have too much experience with BDC, actually, I run away from BDC like the devil runs away from the cross, I always preferes a BAPI.

So, maybe I will ask you a silly question and please forgive me about that. In my program I perform a CALL TRANSACTION ... USIGN ... So the silly question is, there is another way to perform a BDC?

I did not know nothing about BDC_OPEN_GROUP, SM35 and so on, so I will do my home work and google it.

Best regards,

Ronaldo S. Vieira

jlivio90
Active Participant
0 Kudos

Very well.

The migration object runs the bapi you want to use in your program, follow below the mapping of the object, it might be helpful for you.

Function: BAPI_ACT_PRICE_CHECK_AND_POST

Strucuture: BAPIPLNHDR

Fields: CO_AREA FISC_YEAR PERIOD_FROM PERIOD_TO VERSION DOC_HDR_TX PLAN_CURRTYPE

Structure: BAPIACPSTRU

Fields: OBJECT_INDEX VALUE_INDEX ATTRIB_INDEX

Structure: BAPIACPTOT

Fields: VALUE_INDEX ACTVTY_QTY DIST_KEY_QUAN ACTVTY_CAPACTY DIST_KEY_CAPCTY PRICE_FIX DIST_KEY_PRICE_FIX PRICE_VAR DIST_KEY_PRICE_VAR PRICE_UNIT EQUIVALENCE_NO

Structure: BAPIACPCTRL

Fields: ATTRIB_INDEX ACTIVITY_CAT ACT_CAT_ACTUAL PRICE_INDICATOR ALLOC_COST_ELEM

Good luck!

0 Kudos

Thanks again!

I will tell this information with the rest of the development team, maybe they don't know that, but anyway, perhaps this will be very helpful to write my Z program replacing the BDC.

Just an off topic question, by curiosity, where are you from?

Best regards,

Ronaldo S. Vieira

jlivio90
Active Participant
0 Kudos

I'm from São Paulo, Brazil.

Sandra_Rossi
Active Contributor
0 Kudos

You know what is the transaction SHDB, so you have a button to start the BDC by using a session, then go to SM35, and start the session, etc. Now you have also the possibility to generate a program which generates a session. For more information, please search the web.