cancel
Showing results for 
Search instead for 
Did you mean: 

how to add new item to condition table for Sales doc. outputting?

Former Member
0 Kudos

Hi, experts!

I'd like to add new item (Reason for rejection on Sales document item) to condition table of Sales document outputting.

First I added Reason for rejection at "Field Catalog (Output Sales)", then tried to add new output condition table with it, but I couldn't find Reason for rejection at FieldCatlg...

How can I create new output condition table with using Reason for rejection?

Thanks in advance.

Accepted Solutions (0)

Answers (1)

Answers (1)

amit_tunara
Active Contributor
0 Kudos

Hi,

The field "Reason for Rejection" need not be added to field catalog and the field is already available on Item level. In order to print this field on output, you need to take help of ABAPer and map the field in Layout program.

While mapping this field you can put the logic of print the reason of rejection and suppress the print if there is not value for this field for an item.

I hope this will help.

Regards,

Amit

Former Member
0 Kudos

Hi,

Thank you for your reply.

I'm so sorry that my explanation is not enough..

I don't wanna print reason of rejection.

I'd like to use this item as a key of outputting conditions for Sales Order.

For example, when Sales Order is under the condition as below, I'd like to output data of the order..

- Sales Order type: ZOR

- Sales order item category: Z010

- reason of rejection.(on sales order item) : Z01

Thanks in advance.

amit_tunara
Active Contributor
0 Kudos

Hi Taro,

Can you be more specific on the requirement?

Generally, for a normal sales order the Item rejection field is blank and it is used and filled only when an item in sales order cannot be delivered and is to be rejected.

From your explanation, what I can understood that you want Reason of Rejection field in an access sequence for the condition type so that based on the value of Reason of Rejection, some condition is to be determined. Why there is a need for this field to be kept in access sequence to determine the condition value in Sales order?

Please note that for all Sales order, the default value of this field is always BLANK as SAP system cannot assume that the items are to be rejected.

I hope you will understand what I mean.

Regards,

Amit

Former Member
0 Kudos

Hi, Amit

The reason why I wanna use Reason of Rejection field in an access sequence for the condition type is that my company needs a kind of notice when Sales Order item is canceled.

There are too many Sales Orders for our company so that it's not so efficient to view on the report.

And we use some 3rd company system so that data should be transfered when orders are cancelled.

We've been operating manually but it is not efficent...

So we gonna develop automatic data tranfer structure by using output function.

I hope you understand my situation.

Thanks in advance.

amit_tunara
Active Contributor
0 Kudos

Hi Taro,

I got your requirement now. You do not need any condition and access sequence.

You can setup an output IDoc for BA00 for Sales order items. So, when ever the  items is rejected and order is saved, system will generate an IDoc which can be sent to your third party software. For output BA00, there is a requirement module '2'. (You can in transaction NACE for V1 application) In this requirement module you need to implement the below logic to generate an Idoc when the item is rejected.

-- Check to see Sales Order contain at least one Rejected line item

Loop through all items of Sales order and check below condition

IF IT_XVBAP-ABGRU(Rejection field) NE ' '.

     it_flag = 'Y'.

ELSE.

     it_flag = 'N'.

  ENDIF.

IF it_flag = 'Y'.

   flag = 'Y'.

ENDIF.

IF flag = 'Y'.

  sy-subrc = 0.

ELSE.

  sy-subrc = 4.

ENDIF.

Take help of ABAPer to modify the requirement module. This will help you to generate an IDoc when the item is rejected. You need to do integration with your 3rd party software to process this idoc.

Alternatively, you can create your own report in SQ01 (Query builder) on item's rejection status and generate the report for rejected items.

I hope this will help you.

Regards,

Amit