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

ALV_dOUBT

Former Member
0 Likes
1,094

Hi..

A strange thing is happening in my program.

I am using an interactive ALV that is

when the user selects the

Sales document then it goes to VA03

Delivery document then it goes to VL03

Billing document then it goes to VF03

I/B Delivery document then it goes to VL33N

My logic is working fine for all the documents but not for i/b deliveries.

In case of i/b deliveries , when I am clicking the second record it still takes some previous document number and displays it.

Giving a snippet of my code:-

elseif vit_nast_final-kappl = 'E1'

and NOT rs_selfield-value IS INITIAL

and rs_selfield-sel_tab_field NE 'VIT_NAST_FINAL-PROCESS_OUTPUT'.

SET PARAMETER ID 'VL' FIELD vit_nast_final-objky.

CALL TRANSACTION 'VL33N' and skip first screen.

  • Sales orders

elseif vit_nast_final-kappl = 'V1'

and NOT rs_selfield-value IS INITIAL

and rs_selfield-sel_tab_field NE 'VIT_NAST_FINAL-PROCESS_OUTPUT'.

SET PARAMETER ID 'AUN' FIELD vit_nast_final-objky.

CALL TRANSACTION 'VA03' and skip first screen.

  • deliveries

elseif vit_nast_final-kappl = 'V2'

and NOT rs_selfield-value IS INITIAL

and rs_selfield-sel_tab_field NE 'VIT_NAST_FINAL-PROCESS_OUTPUT'.

SET PARAMETER ID 'VL' FIELD vit_nast_final-objky.

CALL TRANSACTION 'VL03N' and skip first screen.

  • invoices / billing

elseif vit_nast_final-kappl = 'V3'

and NOT rs_selfield-value IS INITIAL

and rs_selfield-sel_tab_field NE 'VIT_NAST_FINAL-PROCESS_OUTPUT'.

SET PARAMETER ID 'VF' FIELD vit_nast_final-objky.

CALL TRANSACTION 'VF03' and skip first screen.

  • shipments / transport documents

elseif vit_nast_final-kappl = 'V7'

and NOT rs_selfield-value IS INITIAL

and rs_selfield-sel_tab_field NE 'VIT_NAST_FINAL-PROCESS_OUTPUT'.

SET PARAMETER ID 'TNR' FIELD vit_nast_final-objky.

CALL TRANSACTION 'VT03N' and skip first screen.

I think its because I need to refresh the session memory.

Is it possible?

Thank You

ENDIF.

11 REPLIES 11
Read only

Former Member
0 Likes
1,058

Place a break point at the set parameter id statement and see if the value of vit_nast_final-objky is indeed the selected line.

Regards,

Ravi

Read only

0 Likes
1,058

Hi Ravi..

Yes...its always the selected one....

Its working fine with all the other docs...but only i/b deliveries are giving problem.

thanks

Read only

0 Likes
1,058

Try with Parameter id VLB.

Regards,

ravi

Read only

0 Likes
1,058

I tried using teh parameter VLB ..

Buts its the same thing.

Read only

0 Likes
1,058

Hi Subhash,

I think the problem arises when we pass an invalid Inbound delivery number.

to corroborate this i have done this

1) First pass a valid Outbound delivery number in the set parameter id.

2) Then pass an invalid outb del num.

in second case also, it is going to the last valid outbound delivery number.

so, you have to validate the delivery number that is being passed to the transaction before you give it to the set parameter id statement.

Regards,

ravi

Read only

0 Likes
1,058

Thanks Ravi...

But I am not sure about your point.

Can you please elaborate a little more?

And if that is the case then why is it only giving for i/b delivery and not for others.

Moreover I am passing a valid i/b delivery number.

Read only

0 Likes
1,058

Try with parameter id VLM.

activate.

Log off from sap.

Re login and test.

Regards,

ravi

Read only

0 Likes
1,058

Hi Ravi..

thanks..its working fine now..

But please please tell me how and from where did you come to know about this parameter VLM?

Please tell me

Thank You

Read only

0 Likes
1,058

Hi Subhash,

Go to the main program of the Vl33n transaction i.e

SAPMV50A. In that make a search for "Get parameter id".

The code you have to look at is line 120-125 in the includeMV50AF0T_TRANSAKTION_INIT.

or

Debug the vl33n transaction for the first screen.

Put a break point at the get statements. It will stop at the correct get statement.

Regards,

Ravi

Read only

Former Member
0 Likes
1,058

hi could you check if this is coming because you are trying to call the enjoy transactions.

Could you change you call transaction to the one below

CALL TRANSACTION 'VL33' and skip first screen.

and see if it works.

Read only

0 Likes
1,058

Hi Dominic..

CALL TRANSACTION 'VL33' and skip first screen

also doesn't work.