cancel
Showing results for 
Search instead for 
Did you mean: 

Could not find delivery note parameter

Former Member
0 Kudos

Dear experts,

I have developed a driver program and a smartform to

print GRN Note.

Using nace it is attached to menu and i can launch it also.

But right now i am stuck up how to pass same parameter

which user specifies in text box.

One approach i tried for test was

SELECT OBJKY FROM NAST into v_vbeln WHERE ERDAT =

(sysdate)

AND KSCHL = 'ZD00'.

endselect.

This worked also,however i know as it is taking only last record into consideration of given output type,concurrent users will

experience a vast issue.

My question is:

How can i retrieve vbeln from VL02N inorder to pass it to my smartform?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

What do u mean by 'retrieve vbeln from VL02N '?

By VBELN r u referring to the Outbound Delivery number?

If that be so u can retrieve the VBELN using the key word Get Parameter.

Syntax

GET PARAMETER ID pid FIELD dobj.

Effect

This statement sets the content of the data object dobj to the content of the SPA/GPA parameter specified in pid. pid must be a flat character-type field that contains no more than 20 characters and does not consist solely of blanks; it is also case-sensitive. dobj must be a flat and (as of Release 6.10) character-type field into which the binary content of the SPA/GPA parameter is transferred unconverted.

If the SPA/GPA parameter specified in pid was not yet created in the SAP Memory for the current user, the data object dobj is initialized and sy-subrc is set to 4.

In a program, only those SPA/GPA parameters can be read for which there is a name in the table TPARA. The extended program check reports an error, if it can be statically determined that an ID specified in pid is not in the table TPARA.

System fields

sy-subrc Meaning

0 The SPA/GPA parameter specified in pid exists for the current user in the SAP Memory and its value was transferred to the target field.

4 The SPA/GPA parameter specified in pid does not exist for the current user in the SAP Memory.

In your case:

Example:

DATA: para TYPE tpara-paramid VALUE 'VL',

vbeln TYPE VBELN_VL.

GET PARAMETER ID para FIELD vbeln.

IF sy-subrc <> 0.

MESSAGE 'Parameter not found' TYPE 'I'.

ENDIF.

Try this code in ur driver program.

If u want to know how i got the Parameter ID 'V' for delivery number see the steps below:

1> Goto VL02N

2> Give ur delivery number.

3> In the command area (the place where we type the

tcodes), type /h and press enter to switch on the

debugger.

4> Press enter again. Debugger screen will come.

5> In the menu bar goto->system area-> sap memory.

6> Here u will find all the paramer ids. U will find the delivery no at row 15 corresponding to ID VL.

The SAP Memory is a user-specific memory area of the application server, which is accessed by all main sessions of a user session at once. So u need not worry about other users.

Former Member
0 Kudos

Mr Pratik ,i couldnot find any such variable or kind of variable

which i can conclude for vblen available in Areas-SapMemory

while i have put on the debugger.I have moved to a far level even then no variable is set.

Further i noticed that while debugging there were two cases

case t180-trvog.

when chard.

set parameter id 'VLM' field likp-vbeln.

when charg.

set parameter id 'VLG' field likp-vbeln.

endcase.

and debugger skipped both of theseand directly moved to end-case. Why?

Former Member
0 Kudos

Hi Adi....

I think u r missing something

If u want to know how i got the Parameter ID 'VL' for delivery number see the steps below:

1> Goto VL02N

2> Give ur delivery number. do not press enter after input

3> In the command area (the place where we type the

tcodes), type /h and press enter to switch on the

debugger.

4> Press enter again. Debugger screen will come.

5> In the menu bar goto->system area-> sap memory.

6> Here u will find all the paramer ids. U will find the delivery no at row 15 corresponding to ID VL. use page up and page down to scroll

I have checked it myself..its there. Why dont u try the code Get parameter...... in ur code as in earlier response.. TRY AGAIN..and u dont need to further debug .. the system sets the parameter id ....

Former Member
0 Kudos

I am sending you the copy-paste ,i am doing in same way.I get 19 locations

Area SMEM Element Line

SAP memory (SPA-GPA)

available 16000, used global/local 1871/1871

1 GUI_IS_ON ( 1) <X>

2 GUI_HAS_ACTIVEX ( 1) <X>

3 AVE ( 40) <SAP01 >

4 FBA ( 40) <X1 02X >

5 FBZ ( 40) <SAP >

6 FO2 ( 40) < X X X >

7 FZ1 ( 40) <SAP01 >

8 FZ2 ( 40) <SAP01 >

9 FZ5 ( 40) <SAP01 >

10 KME ( 40) <SAP01 >

11 POK ( 40) <X >

12 PRO_02 ( 40) < 1 >

13 PRO_09 ( 40) <584 50 >

14 PRO_10 ( 40) <167 50 >

15 SCL ( 40) <G >

16 WLC ( 40) <X X XX X >

17 SPR ( 1) <E>

18 US2 ( 28) <2008080411263420080804114458>

19 -VARISPACE ( 15) < >

Former Member
0 Kudos

Hi Adi

I dont knw wats happening. I have copy pasted mine too. I have 25 entries. may I know your SAP Version( 4.6c..wtc). See the ABAP memory also....

SAP memory (SPA-GPA)

available 32000, used global/local 2102/2102

1 GUI_IS_ON ( 1) <X>

2 GUI_HAS_ACTIVEX ( 1) <X>

3 GUI_HAS_HTMLOBJ ( 1) < >

4 FIT_ALV_AR ( 40) <ZCRM_CUST

5 SCL ( 40) <G

6 SPR ( 1) <E>

7 US2 ( 28) <2008080110225120080804054250>

8 -VARISPACE ( 15) < >

9 SPI ( 10) <0000000000>

10 GUI_HAS_JAVABEANS ( 1) < >

11 GR1 ( 10) <NT >

12 SH1 ( 2) <2 >

13 DR_NAVIGATION_ON ( 2) < >

14 F4GMETHOD ( 10) <NoActiveX >

15 VL ( 10) <0084000095>

16 FLAG_DIALOG_STATUS ( 1) < >

17 SHP_PROCESS_VIEW ( 1) <G>

18 AKN ( 10) < >

19 DBG_MAIN_PROGRAM ( 40) <SAPMV50A

20 DBG_DYNPRO_NUMBER ( 4) <4004>

21 DBG_SOURCE_PROGRAM ( 40) <#################################

22 DBG_SOURCE_LINE ( 5) < 1>

Former Member
0 Kudos

Dear Pratik,

Ignoring this observation,i used VL and capture it in field using get parameter.Things worked out for me !!.Full marks to you.

Former Member
0 Kudos

Hi pratik,but when i select using checkboxes in VL71 ,it is not fetching me data.What will be required to do for this.

Former Member
0 Kudos

can u plz elaborate ur question as a separate thread...

What is ur exact requirement.....

Answers (1)

Answers (1)

former_member188005
Contributor
0 Kudos

Aditya,

Check the GRN document in VBFA table where in you can see all the document flow .

There after giving the GRN doc you will get the preceeding doc/ref documents, then pick up the dely doc for your requirement.

First kindly use se11 for checking the table entries and then you can write the code in Smartform itself.

Regards..