Application Development 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: 

Table invoices without output messages

Former Member
0 Kudos

Hi All!

I know that in NAST table I can see the output messages for invoices and from VBRK table I can get all the invoices. But I don't know if there is a table / a field table which tells me if the invoice has not any output message.

I have to create a report with all the invoices for a time period and in this report I should have a field which tells me if the invoice has an RD00 output message.

Any idea about the best solution for this report?

Thank you.

Message was edited by: Florina Cheta

6 REPLIES 6

raguraman_c
Active Contributor
0 Kudos

Hi,

check this out

Message control

Application like PO(purchase order) creation use this technique , where the output type is linked to the application(Message control is a configurable cross application component which can be set in IMG .Such programs are created in the form of function modules and linked to the output type which is linked to the apllication.These have predefined interfaces.

In outbound programs(function module) that use message control the key of the

application document is passed to the function module whcig will read the data from the table depending upon the key passed(NAST structure) and fill the IDOC segemnts with the application data.The control record is also passed to the function module but is not fully filled, the rmaining fields are filled and the control is passed back to the calling program which is RSNASTED and is invoked by the

message control to process ALE and EDI output types and this program on recieving the IDOC data will create the physical IDOC in the system.

The parameteers passed to the function module are

IMPORTING PARAMETERS

OBJECT LIKE NAST

It contains documents key.

CONTROL_RECORD_IN LIKE EDIDC

It contains the partailly filled control record

EXPORETING PARAMETER

OBJECT_TYPE

CONTROL_RECORD_OUT LIKE EDIDC

TABLES

INT_EDID LIKE EDIDD

The internal table used to fill the data records in the same order as they exists in

the IDOC.

The important parameters that should be filled in the custom function module are

CONTROL_RECORD_OUT and INT_EDIDD .The OBJK field of the structue NAST contains the key of the apllication document.

===========================================

Message control and output type. In R/3, message control is a mechanism by which documents are output based on certain selection criteria, requirements, and sequences. Message control determines the type of document, its timing, number, and medium (print, fax, ALE, or EDI.). Outbound messages in SD (Sales and Distribution) and MM (Materials Management, Purchasing) are created and processed by message control records. The output records are stored in the NAST table.

Message control uses the condition technique. The conditions for creating an output message are stored in condition tables that have selection fields picked from a catalog of application fields/tables. To determine if an application document qualifies for output, search strategies are used through access sequences, output procedures, and requirements. Once a message qualifies for output, message control modules use the parameters set in the condition type or output type to determine the timing of transmission and the medium of the message. The output type also specifies the program or module to be invoked to create the output.

Message/output determinations are concepts applicable not only to EDI and ALE, but also to other output mediums.

also check this link...

http://www.erpgenie.com/sapedi/messagecontrol.htm

Feel free to revert back.

--Ragu

0 Kudos

Thank you Ragu for your quick response!

I considered to use SQ02 and SQ01 to create the report. I can get from VBRK all the invoices for a time period but if I make join with NAST table, I get only the invoices that had at least one output message. And this is not what I wish. So, I can't make a join between this two tables if the required report should contain all the invoices and for each one the information about the output message (the invoice has any output message or not).

Any hint for me?

Thanks.

Former Member
0 Kudos

Hi

If there isn't any hit for a certain invoice in NAST table it means that invoice hasn't a message.

So you should create a query for the NAST table where KSCHL is RD00.

TABLES: VBRK.

SELECT-OPTIONS: SO_VBELN FOR VBRK-VBELN,

SO_FKDAT FOR VBRK-FKDAT.

DATA: T_NAST LIKE STANDARD TABLE OF NAST WITH HEDAER LINE.

DATA: BEGIN OF T_VBRK OCCURS 0,

VBELN LIKE VBRK-VBELN,

END OF T_VBRK.

START-OF-SELECTION.

SELECT VBELN FROM VBRK INTO TABLE T_VBRK

WHERE VBELN IN SO_VBELN

AND FKDAT IN SO_FKDAT.

IF SY-SUBRC = O.

SELECT * FROM NAST INTO TABLE T_NAST

FOR ALL ENTRIES IN T_VBRK WHERE KAPPL = 'V3'

AND OBJKY = T_VBRK-VBELN

AND KSCHL = 'RD00'.

ENDIF.

Max

0 Kudos

Mille grazie Max!

Can I implement this solution with SAPQuery (SQ01 and SQ02)?

Florina

0 Kudos

Hi

Try to create an INFOSET where you define a join with VBRK and NAST table.

Max

0 Kudos

Hi Max!

I have already done that but in this way the report contain only the invoices with output message (the join condition is reached only for this invoices).

I though that must be a way to get the information (the invoice has an RD00 output message or hasn't). Maybe an additional field...but I don't know how to bring the information in this field.

Can you help me?

Thanks.

Florina