cancel
Showing results for 
Search instead for 
Did you mean: 

creating sales order using BAPI, through BSP using 2 pages. one for input

Former Member
0 Kudos

Hi Friends,

i have a Requirement that....

i want to create a BSP pages, in first page i have to give input data (in input fields) which is required to create a sales order through BAPI function module (BAPI_SALESORDER_CREATEFROMDAT1).

in the second page what ever the result given by BAPI FM, that result i want to display on the second page.

so how i can i proceed with input fields in first page and result in second page. please through some input on this.

thanks in advance.

sree

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

dear sree,

please refer to bsp apps

<b>SBSPEXT_HTMLB</b> - htmlb elements

<b>SBSPEXT_PHTMLB</b> - phtmlb elements

<b>SBSPEXT_XHTMLB</b> - xhtmlb elements

<b>sbspext_table</b> - for table view examples

hope these examples give u an idea of using the elements..

best regards,

suhair

Former Member
0 Kudos

Hi,

You can consider the following roughly:

1.)a drop down list box for Order Type. Say if you are using MVC design pattern, through model data binding you can automatically populate the drop down list.

2.)And for Sales Area (SalesOrg/DistrChn/Division) & Sold to Party you can have input fields.

3.) Take the item data into a table view and pass that internal table to the Items tab of the BAPI.

Regards,

Ravikiran.

Former Member
0 Kudos

Hi Ravi,

nice inputs from u. some more help need from u.

how can i code for the dropdown box, table view, input fileds in the bsp page coding.

shall i have some rough code for these things in the first bsp page.(se80).

thanks for u r great inputs.

regards,

sree

Former Member
0 Kudos

Coding for Drop down list box for Order Type, in the layout with model data binding would be like this:

<htmlb:dropdownListBox id         = "order_type"
                                   selection  = "//mdso/PARAMETERS.ORDER_TYPE"
                                   helpValues = "//mdso/PARAMETERS.ORDER_TYPE" />

Here mdso is the model object instance of which parameters is an attribute.

Regards,

Ravikiran.

Consider awarding points for helpful replies.

former_member689397
Active Participant
0 Kudos

Hi Sree,

If you are going to use MVC pattern to do the following steps.

For example. company code selection...

In Model class-INIT() method.

DATA : S_COMP LIKE LINE OF <table>.

READ TABLE <table> INTO S_COMP INDEX 1.

IF SY-SUBRC <> 0.

S_COMP-TEXT = <variable>.

S_COMP-KEY = '1'.

APPEND S_COMP TO <i_table>.

CLEAR S_COMP.

INSERT S_COMP INTO <i_table> INDEX 1.

ENDIF.

HTML View page.

<htmlb:dropdownListBox id = "comp"

table = "//model/<table>"

selection = "//model/<variable>"

nameOfKeyColumn = "text"

nameOfValueColumn = "text"

onSelect = "<Event name>" />

Thanks,

Suriya.