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

Two field value in a single parameter statement

Former Member
0 Likes
1,070

Hi all,

am using the below statement and selecting the document number that i need over a range of document numbers.

PARAMETERS:BELNR1 LIKE BSID-BELNR OBLIGATORY.

I have an issue here i also want the display of documents numbers(BELNR) of BSAD table and am not supposed to use one more parameters statement.So in the display i want document numbers of both the table BSAD & BSID..Please help

With Regards

Vijay

5 REPLIES 5
Read only

Former Member
0 Likes
818

Hi Vijay

use two parameter statements.

PARAMETERS:BELNR1 LIKE BSID-BELNR OBLIGATORY.

PARAMETERS:BELNR LIKE BSAD-BELNR OBLIGATORY.

R U GETTING ANY ERROR?

Message was edited by:

KIRAN KUMAR

Read only

0 Likes
818

Hi Kiran

If thats the case i will get two separate fields in the output which i dont want.i want all the documents numbers to be from the same field

with regards

vijy

Read only

0 Likes
818

in that case create internal table with one field belnr,

and pass the values between belnr and belnr1

revert back if u have doubts if i am wrong clearly explain what exactly do u want

reward points to all helpful answers

kiran.M

Read only

Former Member
0 Likes
818

Hello vijay,

<b>You can get belnr common to BSAD & BSID through the following process</b>

<b>summary</b>: Create a database view...and assign the view in Selection method for a search help and write the code

PARAMETERS BELNR1 TYPE BELNR_D MATCHCODE OBJECT searchhelp name.

<b>Explanation :::Please do the following

**********************************************</b>

se11 -><b> create a view 'ZBELNR'</b> -> Database view -> enter text

<b>in the TAB Table/join conditions</b>

in tables write

BSAD

BSID

<b>in join /Table conditions</b>

BSAD MANDT = BSID MANDT

BSAD BELNR = BSID BELNR

****so the common Belnr will get selected

<b>in the tab view fields</b>

enter the field name you want to see on search help being clicked

save and activate

<b>create a search help</b> in se11 -> elementary help -> Zsearchhelp

<b>in tab definition -> selection method</b> enter the name of the view created ZBELNR

<b>in the search help parameter</b>..enter the name of the fields which are there in the "view fields" of the the database projection which you have created,ie fields which needs to come on search help(some people add text also with search help)

once the object is created use the following code

<b>PARAMETERS BELNR1 TYPE BELNR_D MATCHCODE OBJECT Zsearchhelp</b> (searchhelp name).

Hope it proved useful(i have tried out myself sucessfully),

Reward if useful

Regards

Byju

Read only

Former Member
0 Likes
818

Hi , u can use only one parameter statement if u need to input only one value that is applicable to field belnr of both tables .

Because belnr field is same in both bsad and bsid so u can use only on parameter to feed value belnt to both tables .

Ex:

parameter a type belnr_d .

belnr_d is a data element iused for belnr field in both tables .Then u can use ur select statement accordingly .

select --- from bsad into table itab where belnr = a .

Regards