Application Development and Automation 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: 
Read only

SmartForm retrieving document number from NAST

Former Member
0 Likes
2,560

Hello everybody,

I am relatively new to SAP as well as the development of SmartForms and have one question on how to retrieve the document number for a specific form.

I know that for example if during billing document processing output type RD00 is triggered an entry is stored in table NAST with OBJKY being the billing document number.

But how do I fetch this field in my driver program?

Furthermore, the output type and the corresponding OBJKY is defined by a consultant, right?

Thanks a lot!

Rene

1 ACCEPTED SOLUTION
Read only

Dominik_Tylczynski
SAP Champion
SAP Champion
2,194

Hello steinbauer123

Just take a look at the implementation of any standard output types. An output type calls a form routine. The main program where the form routine is implemented features declaration:

TABLES: NAST.

By virtue of this declaration you can access the output record, just by reading e.g. NAST-OBJKY field.

The output type is typically customized by a functional consultant. OBJKY contains concatenated key fields to the object being processed. In case of SD billing document that will be MANDT and VBELN i.e. key fields of VBRK table.

Best regards

Dominik Tylczynski

Hello everybody,

I am relatively new to SAP as well as the development of SmartForms and have one question on how to retrieve the document number for a specific form.

I know that for example if during billing document processing output type RD00 is triggered an entry is stored in table NAST with OBJKY being the billing document number.

But how do I fetch this field in my driver program?

Furthermore, the output type and the corresponding OBJKY is defined by a consultant, right?

Thanks a lot!

Rene

2 REPLIES 2
Read only

Dominik_Tylczynski
SAP Champion
SAP Champion
2,195

Hello steinbauer123

Just take a look at the implementation of any standard output types. An output type calls a form routine. The main program where the form routine is implemented features declaration:

TABLES: NAST.

By virtue of this declaration you can access the output record, just by reading e.g. NAST-OBJKY field.

The output type is typically customized by a functional consultant. OBJKY contains concatenated key fields to the object being processed. In case of SD billing document that will be MANDT and VBELN i.e. key fields of VBRK table.

Best regards

Dominik Tylczynski

Read only

2,194

steinbauer123 In fact your issue is not related to Smart Forms, but to any kind of correspondence of Message Control. TABLES is a way of sharing memory, see ABAP documentation (used for passing parameters in this case).