2010 Jan 06 8:46 AM
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
2010 Jan 06 11:34 AM
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?
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?
2010 Jan 06 9:21 AM
2010 Jan 06 10:43 AM
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
2010 Jan 06 11:34 AM
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?
2010 Jan 06 12:45 PM
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.
2010 Jan 06 1:08 PM
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.
2010 Jan 06 1:15 PM
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.
2010 Jan 06 1:26 PM
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?
2010 Jan 06 1:38 PM
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.
2010 Jan 06 2:08 PM
2010 Jan 07 4:48 AM
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...
2010 Jan 07 7:36 AM
search for it.
goto SE11, enter the table, click the where-used button and select function module interface.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |