Skip to Content

Attention: WOLFGANG VALTIN Re: VA01 Enhancement

Hello Wolfgang,

Thanks for the info, i found the part where i should place the validation.. apologies for marking this question as unanswered, your info is very helpful.

I do have another question for if You dont mind..

In the previous enhancement of VA01, the PO number (fxvbkd-bstkd) which was entered in the 'PO Number' field in 'Create Direct - Pull Out: Overview' screen, is being checked if it has been used before. Pls. See Codes:

METHOD if_ex_badi_sd_sales~save_document_prepare.

DATA: wa_fxvbkd TYPE vbkd,

v_bstnk TYPE vbak-bstnk.

IF fvbak-auart = 'ZDRE' OR

fvbak-auart = 'ZORE' OR

fvbak-auart = 'ZOKA' OR

fvbak-auart = 'ZMKA'.

READ TABLE fxvbkd INTO wa_fxvbkd INDEX 1.

Check if RRC number is already used

SELECT SINGLE bstnk FROM vbak INTO v_bstnk WHERE ( auart = 'ZDRE'

OR auart = 'ZORE'

OR auart = 'ZOKA'

OR auart = 'ZMKA' )

AND bstnk = wa_fxvbkd-bstkd.

IF sy-subrc = 0.

MESSAGE e002(z_msg) .


ENDIF. "IF fvbak-auart = 'ZDRE' OR


What I need to add now is check PO Number is within the Range the user defined AND it is for a particular Forwarder.

The range is maintained in a user defined/maintained table which i already created, it has 4 fields (Forwarder, From, To, Company Code). I have to dissect the PO number that the user entered (FOxxxxxxxxxx) into 2 parts, the first part is for the 'FO', which is validated against the Company Code field of the user defined table and the 2nd part 'xxxxxxxxxx' should be validated if it is between the From and To field of the user-defined table. Now, in the screen 'Create Direct - Pull Out: Overview' there is a button for 'Display doc. Header Details', i clicked on this button right after entering the necessary data. The screen 'Create Direct - Pull Out: Header Data', I go to the 'Partners' Tab to fill out the 'partner function' and the 'Partner' field. The question is, how do i capture the value entered in the 'Partner' field? so i can validate it against the 'Forwarder' field of the user-defined table. The over all condition for the transaction to save should be:

IF the PO number has NOT been used before (this is the previous enhancement).

In my enhancement:

IF the value entered (Trucker) in the 'Partner' field exists in the user defined table AND if that value (Trucker) has a 'Company Code' that is equal to the first 2 characters entered (FO) by the user AND if the last 10 characters of the PO number is between the From and To fields of the user-defined table that has a Forwarder value of (Trucker) and Company Code (FO).

My question is quite long. I do Hope you can help me...



Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Jan 30, 2008 at 10:26 AM

    Hello Franklin,

    sorry, but i don't know that szenario . So i can only guess:

    If that partner is a partner to the sales order, you could access the partner number inside that BADI

    in the table FXVBPA. If it's only a partner to the PO, you need the PO-data.

    Might be that you can access these data via the document flow (inside that BADI table FXVBAPF or FXVBFA). So, just set a break-point into the BADI-Coding and check, if the data you need are available

    in some of these interface tables.

    Regards Wolfgang

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.