Application Development 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: 

BDC to create purchase requistion

Former Member
0 Kudos

Hi ,

HAVE ANYBODY CREATED BDC TO UPLOAD PURCHASE REQUISITIONS?

PLEASE GIVE HELP IN PROGRAM TO CREATE PR USING THAT BDC (UPLOAD DATA FOR PR CREATION)

Thanks

Lovleen

1 REPLY 1

Former Member
0 Kudos

hI

Can you use the following code steps

code

Reset the release strategy of PR line item.

CALL FUNCTION 'BAPI_REQUISITION_RESET_RELEASE'

EXPORTING

number = pw_banfn

item = pw_bnfpo

rel_code = pw_rel_code

use_exceptions = space

TABLES

return = tl_return[].

IF NOT tl_return[] IS INITIAL.

pw_subrc = 1.

pw_rel = c_e.

READ TABLE tl_return ASSIGNING <l_return> INDEX 1.

CONCATENATE pw_banfn pw_bnfpo '-' <l_return>-message

INTO wal_line-tdline

SEPARATED BY space.

APPEND wal_line TO t_lines.

EXIT.

ELSE.

pw_subrc = 0.

pw_rel = c_s.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

EXPORTING

wait = c_check.

CONCATENATE pw_banfn pw_bnfpo '-' text-n13

INTO wal_line-tdline

SEPARATED BY space.

APPEND wal_line TO t_lines.[/code]

Hope This Helps

aruna