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

EXTENSION IN Value in BAPI_REQUISITION_CREATE

Former Member
0 Likes
5,360

Hi ,

I am creating PR thru BAPI_REQUISITION_CREATE. there are some custom fields in EBAN via append structure CI_EBANDB. I am concatenating these values and passing it to parameter Extension but values are not separating in proper manner due this PR not getting saved.

Values CI_EBAN

FIELD1 char10

FIELD2 char20

FIELD3 char5

FILED4 curr (15/2)

FIELD5 char4

FIELD6 curr

I am concatenating like this:

extension-structure = 'BAPI_TE_REQUISITION_ITEM' .

PREQ_ITEM = 10 .

FILED1 = '  12345678'.   " 8 char value and 2 space

FIELD2 = '           123456879'. " 10 char value and 10 space

FILED3 = '     ' .  " 5 space

FIELD4 = '00000000001200.00' . "Total length 17

FIELD5 = '1234'. " 4 char

FILED6 = '00000000001400.00' "total length 17

CONCATENATE PREQ_ITEM FIELD1 FIELD2 FIELD3 FIELD4 FIELD5 FIELD6 into extension-valuepart1 .

append extension .

But this not working. Please suggest if wrong .

Jitendra

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,922

Hi,

Instead of concatenating, you could fill the Extension structure fields directly. Please refer this thread - http://scn.sap.com/thread/170189

And, when you specify the values for concatenating, the spaces should be in the end.

Hi ,

I am creating PR thru BAPI_REQUISITION_CREATE. there are some custom fields in EBAN via append structure CI_EBANDB. I am concatenating these values and passing it to parameter Extension but values are not separating in proper manner due this PR not getting saved.

Values CI_EBAN

FIELD1 char10

FIELD2 char20

FIELD3 char5

FILED4 curr (15/2)

FIELD5 char4

FIELD6 curr

I am concatenating like this:

extension-structure = 'BAPI_TE_REQUISITION_ITEM' .

PREQ_ITEM = 10 .

FILED1 = '  12345678'.   " 8 char value and 2 space

FIELD2 = '           123456879'. " 10 char value and 10 space

FILED3 = '     ' .  " 5 space

FIELD4 = '00000000001200.00' . "Total length 17

FIELD5 = '1234'. " 4 char

FILED6 = '00000000001400.00' "total length 17

CONCATENATE PREQ_ITEM FIELD1 FIELD2 FIELD3 FIELD4 FIELD5 FIELD6 into extension-valuepart1 .

append extension .

But this not working. Please suggest if wrong .

Jitendra

6 REPLIES 6
Read only

Former Member
0 Likes
2,922

To concatenate , field must be of type (C, N, D, T or string)

What is type FIELD4 and FILED 6 if its currency type you can't use in concatenation.

For that create  local variables type string then copy the field4 and field6 to these variable and use that in concatenation

Read only

0 Likes
2,922

Yes Aruna this currency type and I am doing the same.

Jitendra

Read only

0 Likes
2,922

Try with  RESPECTING BLANKS

CONCATENATE PREQ_ITEM FIELD1 FIELD2 FIELD3 FIELD4 FIELD5 FIELD6

into extension-valuepart1  RESPECTING BLANKS .

Read only

Former Member
0 Likes
2,923

Hi,

Instead of concatenating, you could fill the Extension structure fields directly. Please refer this thread - http://scn.sap.com/thread/170189

And, when you specify the values for concatenating, the spaces should be in the end.

Read only

0 Likes
2,922

Hi Sharmila,

I did the same.

DATA: T_EXTN_DATA LIKE BAPIPAREX OCCURS 0 WITH HEADER LINE  .

DATA: S_EXT TYPE BAPI_TE_REQUISITION_ITEM .

T_EXTN_DATA-STRUCTURE = 'BAPI_TE_REQUISITION_ITEM' .

S_EXT-PREQ_ITEM = '00010' ..

S_EXT-ZZEDATE = '20140910' .

S_EXT-ZZMOSHP = 'ROAD' .

S_EXT-ZZDESTN = 'MUMBAI' .

S_EXT-ZZINCO1 = 'FOB' .

S_EXT-ZZINCO2 = 'FOB' .

S_EXT-ZZNETPR = '1200.00' .

S_EXT-ZZZTERM = 'C001' .

S_EXT-ZZCURRN ='USD' .

T_EXTN_DATA+30 = S_EXT .

APPEND T_EXTN_DATA .

But at the time of program activation showing error:

"T_EXTN_DATA+30(960)" and "S_EXT" are not mutually convertible in a Unicode program. program.

Jitendra

Read only

0 Likes
2,922