Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.1k views
in Technique[技术] by (71.8m points)

sap - 如何在功能模块的“导入”或“表格”参数中输入批量数据并将其另存为测试数据(How to enter bulk data in Importing or Table parameter of a Function Module and save it as Test Data)

I have an importing parameter of Table Type in a Function Module / BAPI which is having only one field (material number).

(我在功能模块/ BAPI中只有一个字段(材料编号)具有表类型的导入参数。)

I want to enter hundreds of rows to that Parameter and save it as test data.

(我想向该参数输入数百行并将其保存为测试数据。)

If I follow the normal procedure, I have to create new row and enter/paste a material.

(如果遵循正常程序,则必须创建新行并输入/粘贴材料。)

And this has to be repeated for every material as bulk data cannot be pasted into that!

(而且对于每种材料都必须重复此操作,因为无法将大量数据粘贴到其中!)

Can anybody know what is the best way to enter and save bulk data for the importing/table parameter?

(谁能知道输入和保存import / table参数的批量数据的最佳方法是什么?)

  ask by Rahul Gupta translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

You must create the same typed table in Your calling program.

(您必须在调用程序中创建相同类型的表。)

In the program You can add as much materials as You want by adding each lv_matnr to the local table (in a loop for example).

(在程序中,您可以通过将每个lv_matnr添加到本地表中(例如,在循环中)添加任意数量的材料。)

Then You pass Your local table to Your function module when You call it with exporting and voila.

(然后,当您使用export和voila进行调用时,将本地表传递给功能模块。)

The called function module receives as much matnr entries, as You passed during call.

(被调用的功能模块接收与您在调用期间传递的一样多的matnr条目。)

Did that help?

(有帮助吗?)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...