Skip to Content
avatar image
Former Member

check sales order exits for category ZTAC

Hi Experts

I have a requirement to modify the iDOC interfaced program,

In the routien which checks for the existence of a production order, I have to modify the following

1. Inspect each item on the sales order

2. If (and only if) there is atleast one item with a category of "ZTAC" then check for a production order otherwise processing the order in the usual manner.

Could anyone tell me how to check (Is there a sales order) if no then display error message if yes then is there a production order if no display error message if yes Create confirmation .......................

I want to know how to write a coding to check sales order exits from table VBAP,VBAK Etc., .

Thanks in Advanced

Regards

Piroz

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Sep 19, 2008 at 01:59 AM

    Hi Eslam ,

    check program MV45AFZZ user exit.

    or

    SPRO-->SD->SYStem modifications.

    regards

    Prabhu

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 19, 2008 at 02:13 AM

    Hi Prabhu

    Thanks for your email and response but I need to check this in program for IDOC ....Modification

    Insert code in this way

    check sales order for category = 'ZTAN' inspect for each item on sales order

    and if you found item with cateogry ZTAN then check for production order otherwise go asual manner

    • I WANT TO WRITE A CODING HERE **********************

    if production order required then check

    for each item on sales order item list

    with item category = 'ZTAC' then

    return true

    next

    end function

    ...................................

    VBAP TABLE field VBELN and PSTYV (ZTAC,ZTAN Etc)

    Eg of coding

    if lva_saleord is initial

    select single * from vbap into l_saleord

    where vbelv = lva_saleord

    and vbeln = lva_vbeln and

    exit.

    endselect.

    endif.

    I want to write a small program in between to check the sales order exits if it is then I have to go to deliveries ...................

    Regards

    Eslam

    Add comment
    10|10000 characters needed characters exceeded