cancel
Showing results for 
Search instead for 
Did you mean: 

IPC programming help needed

Former Member
0 Kudos

Hi

I'm new to IPC programming but very familiar to JAVA and I am in desperate need for some help on reprogramming ABAP programs (conditions and formulas) to JAVA.

Most of my ABAP code looks like this program:

if komk-vbtyp = 'H' and

komk-auart = 'ZOR' and

komk-kalsm = 'ZXXX'.

CHECK: komp-vgbel <> SPACE.

endif.

Can anybody give some help/hints on how to convert this program to JAVA?

We are using IPC on CRM 4.0

Best regards,

Christian

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Christian,

The best way is to start is to go through examples at

<ipc_install>\ipc\doc\spe. The name of the file to choose to start is UserExitsExamples.html.

Regards,

Vivek

Former Member
0 Kudos

Hi Vivek

Thanks for the tip.

I have studied the documentation, but what I need is some help converting the ABAP programs to JAVA. I have read that I have to use the getHeaderAttributeValue(..) method to access KOMK structure fields. If I have to check the field "komk-vbtyp", can I use prItem.getHeaderAttributeValue("vbtyp") or do I have to access the field in another way?

best regards

Christian

KaushalShah
Active Contributor
0 Kudos

KOMK fields & IPC fields won't have same names. You have to study individual object documentations (IPricingItem, IPricingDocument, IPricingCondition) to get yourself acquianted with the structure.

For ex., since komk is header pricing structure, there are changes that you will find this field in IPricingDocument.

If you can't find it there, then you need to use prItem.getHeaderAttributeValue function. Name of field you can check by actually studying Field Catalog (SPRO > CRM > Basic functions > pricing > define settings for pricing > field catalog). Here go through header fields. For VBTYP, you should find something like transaction category.

If you are out of luck, you may not find the field here. In that case, you have to add a new field (custom) in field catalog & write code in userexit to populate this new field.

Hope this helps.

Regards,

Kaushal

Former Member
0 Kudos

Hi Kushal

Thank a lot for your answer, it helped me a lot.

I habe another question regarding IPC programming. In one of my formulas I have a database table selection (SELECT * FROM ...), what is the best way to make the same selection in JAVA? I read that a JCO connection was not recommended.

Best regards

Christian

KaushalShah
Active Contributor
0 Kudos

You are right. JCO connection is not recommended, as that will hit performance very badly.

You don't have any other option, but to change design of the code. You will have to change the logic of the formula in such a way that select is not required at all. If required, you will need to pass that information in field catalog.

If passing the information by field catalog is not possible (table is too large), then you can try hard-coding this information into userexit file itself. This option is still better than using JCO.

If that is also not possible, then you will have to go for JCO connection. Have a look at post for further information on that approach.

Hope this helps.

Regards,

Kaushal

Answers (0)