Application Development and Automation 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: 
Read only

validating the Partner function values which are coming from Legacy system

Former Member
0 Likes
1,549

Hi,

To upload the quoations,I am getting a file from legacy system.

In that file even if i enter invalid partner function Ex: 'FG' Successfully quoatations is getting created in SAP.

Pls suggest how to valid the Partner function values which are coming from Legacy system.

Edited by: kiruthiga balusamy on Jan 6, 2010 9:46 AM

1 ACCEPTED SOLUTION
Read only

JL23
Active Contributor
0 Likes
1,438

even if i enter invalid partner function Ex: 'FG' Successfully quoatations is getting created in SAP.

you mean you can then see this "invalid" partner function with its partner number in the quotation?

what happens if you use the change transaction and change any field and save? do you then get an error about this "invalid" partner function?

Hi,

To upload the quoations,I am getting a file from legacy system.

In that file even if i enter invalid partner function Ex: 'FG' Successfully quoatations is getting created in SAP.

Pls suggest how to valid the Partner function values which are coming from Legacy system.

Edited by: kiruthiga balusamy on Jan 6, 2010 9:46 AM

11 REPLIES 11
Read only

JL23
Active Contributor
0 Likes
1,438

what method do you use to load the quotations?

Read only

Former Member
0 Likes
1,438

I am using LSMW Method

BAPI Method CREATEFROMDATA2 and Business Object BUS2031 to create the quotations

Edited by: kiruthiga balusamy on Jan 6, 2010 11:48 AM

Read only

JL23
Active Contributor
0 Likes
1,439

even if i enter invalid partner function Ex: 'FG' Successfully quoatations is getting created in SAP.

you mean you can then see this "invalid" partner function with its partner number in the quotation?

what happens if you use the change transaction and change any field and save? do you then get an error about this "invalid" partner function?

Read only

Former Member
0 Likes
1,438

The quoatation is getting created with SP,BP,PY,SH,ZR in sequence with default partner numbers.(Not creating the patner function FG in quoatation)

But it should not happen if any of the partner function is invalid then the record shouldnot be uploaded.

Read only

JL23
Active Contributor
0 Likes
1,438

if want do that, then you have to add some coding.

check first what partner schema is assigned to the order type in table TVAK

then check in in table TPAER for the partner schema what partner roles are allowed.

Read only

Former Member
0 Likes
1,438

I am not able to see the partner schema in TVAK table.

Currently i am as follows:

clear : f03501_partners,wa_error.

*Convert the partner function into SAP format

LOOP AT f03501_partners INTO f03501_partners.

Call Function 'CONVERSION_EXIT_PARVW_INPUT'

Exporting

Input = F03501_PARTNERS-PARTN_ROLE

Importing

Output = WA_PARVW.

*Validating the partner function

Select single parvw

from TPAER

into WA_PARVW

where parvw EQ wa_parvw.

If sy-subrc ne 0.

*Invalid partner function

clear wa_error.

move : F03501_PARTNERS-PARTN_ROLE to wa_error-parvw,

'Please check the Partner function' to wa_error-message.

append wa_error to t_error.

*Skip this record for further Processing

skip_transaction.

If you have any better solution than this suggest me.

Read only

JL23
Active Contributor
0 Likes
1,438

field PARGR in table TVAK holds the partner schema.

if there is nothing, then you may need to customize the partner determination and its schema assigment to an order tyoe in IMG first to be able to validate on that basis.

How else can you know which partner role is allowed or not?

Or do you want do validate only whether the partner role itself exists, no matter if it is used in a schema?

Read only

Former Member
0 Likes
1,438

Ok . Now i understood.

First of all i should fetch PARGR from TVAK table for given document type.

Then i should populate the PARVW values from TPAER table into internal table(Say ITAB) for obtained PARGR.

and then i should check the partner function values coming from legacy file whther exists in ITAB or not.

If any one of the partner function is invalid for a document then i should throw an error message.

Is my understaing is correct.

Or Do you have any better solution for this.Pls suggest.Thanks for your updates.

Read only

JL23
Active Contributor
0 Likes
1,438

you understood well

Read only

Former Member
0 Likes
1,438

Don't we have any other better solution like any FM like that...

Because in the above solution i have to hit the DB tables twice...

Read only

JL23
Active Contributor
0 Likes
1,438

search for it.

goto SE11, enter the table, click the where-used button and select function module interface.